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
- // Any name you like
- Interpreters name: Ruby
- 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
- // The rdoc file under the bin directory, no extension, not rdoc. bat
- Rdoc path: D:/Ruby/bin/rdoc
- // Ri file under the bin directory, no extension, not Ri. bat
- RI path: D:/Ruby/bin/ri
<SCRIPT> render_code (); </SCRIPT>
2.2 configure rails and rake
Open "windows --> Preferences" and choose "rails --> Configuration"
Code
- // The rails file under the bin directory, with no extension, not rails. bat
- Rails path: D:/Ruby/bin/rails
- // 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)
- Rake path: D:/Ruby/bin/rake
- // The mongrel_rails file under the bin directory, without the extension. If not, run gem install mongrel to install
- 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.