Ruby Installation & plug-in installation in eclipse

Source: Internet
Author: User

1.1 install Ruby one-click installer on the download pageHttp://www.ruby-lang.org/en/downloads/

1.2 install rails. Run "Gem install rails -- include-dependencies" in Windows cmd (start --> Run --> cmd) to install rails automatically.

Install Ruby plug-in eclipse

 

We recommend that you install the plug-in remotely through eclipse updates.
Choose Help> Software Updates> Find and install from the eclipse menu.
Select search for new features to install.

You need to install two plug-ins:
1, RDT
Http://updatesite.rubypeople.org/release 2, radrails
Http://radrails.sourceforge.net/update After installation, you need to set the location of the Ruby interpreter.

Use the eclipse menu windows> preferences to open the preferences dialog box and set the ruby location in the installed interpreters item under the ruby title.

2.1 configure Ruby

2.1.1 configure interpreters
Open "windows --> Preferences", select "Ruby --> installed interpreters", and click the prompt box that appears in "add ".

Code
    1. // Any name you like
    2. Interpreters name: Ruby
    3. Location: D:/Ruby/bin/ruby.exe

<SCRIPT> render_code (); </SCRIPT>

 

2.1.2 configure RI/rdoc
Open "windows --> Preferences" and select "Ruby --> RI/rdoc"

Code
    1. // The rdoc file under the bin directory, no extension, not rdoc. bat
    2. Rdoc path: D:/Ruby/bin/rdoc
    3. // Ri file under the bin directory, no extension, not Ri. bat
    4. RI path: D:/Ruby/bin/ri

<SCRIPT> render_code (); </SCRIPT>

 

2.2 configure rails and rake
Open "windows --> Preferences" and choose "rails --> Configuration"

Code
    1. // The rails file under the bin directory, with no extension, not rails. bat
    2. Rails path: D:/Ruby/bin/rails
    3. // The rake file under the bin directory, with no extension, not rake. bat. If there is no rake file, run gem update Rake (installation) or gem install Rake (upgrade)
    4. Rake path: D:/Ruby/bin/rake
    5. // The mongrel_rails file under the bin directory, without the extension. If not, run gem install mongrel to install
    6. Mongrel path: D:/Ruby/bin/mongrel_rails

<SCRIPT> render_code (); </SCRIPT>

 

3. Summary
It is very easy to install radrails, but the configuration is still very prone to problems, especially a few paths. Except ruby.exe, there are no extensions for others. Beginners are prone to problems, so I stress it again.


This completes the ruby environment. Create a ruby project in eclipse, create a ruby file, and write puts "OK" to see the eclipse console output OK information.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.