Install and configure Ruby for eclipse

Source: Internet
Author: User

Out of curiosity about Ruby, good morning. Let's take a look at it. The syntax is concise and it's a good language,

Have time to learn more

Http://www.ruby-lang.org/zh_CN/documentation/ help documentation

 

 

--- The following installation configuration is reprinted

I. Preparations before installation:

1. Download RUBY: http://www.ruby-lang.org/en/downloads/

2. Download RDT (Ruby development tools) for Eclipse: http://sourceforge.net/project/showfiles.php? Group_id = 50233

3. Download radrails for Eclipse: http://update.aptana.com/install/rails/3.2/

We recommend that you download all the plug-ins and install them again. The reason is very simple. The new remote site of eclipse often fails to be installed due to network problems. It is much easier to download and install it.

 

Ii. Install the ruby environment and plug-ins:

1. Install the Ruby interpreter: double-click the downloaded EXE file and follow the Installation Wizard to install it;

2. Install rails: Enter the following command in the CMD window: "Gem install rails -- include-dependencies ";

2. install the RDT plug-in: Go to eclipse> help> Software Updates> Find and install...> search for new feature to install> new local site, select the extract directory of the RDT plug-in, and follow the instructions in the Wizard to install the plug-in;

3. install the radrails plug-in: Go to eclipse> help> Software Updates> Find and install...> search for new feature to install> new local site, select the downloaded file and follow the instructions in the Wizard to install the file;

 

3. Configure the ruby environment:

1. the ruby version I used is 1.86, And the eclipse version is 3.3.1. Basically, no configuration is required after installation. Open eclispe> windowns> preferences> Ruby> installed interpreters, we can see that jruby has been set as a virtual machine by default;

 

2. If you want to use native Ruby as a virtual machine, you can click "add" to set the ruby running directory. At this time, the setting is completed, and you do not need to set other system paths as in the previous version.

 

 

4. Hello Ruby:

1. Select the menu eclispe> New> Project> Ruby project to create a ruby project "helloruby ";

2. Right-click the new Ruby project and choose new> Ruby class to create a new Ruby class named helloruby;

 

3. Write the following code into the new class, and hello Ruby is complete. Right-click the project and choose run as> Ruby application to output the result.

 

Class helloruby
Print "Hello Ruby! "
End

Article Source: DIY tribe (http://www.diybl.com/course/1_web/webjs/2008224/101739.html)

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.