Use eclipse and RDT to develop Ruby applications

Source: Internet
Author: User

Use eclipse and RDT to develop Ruby applications

Liubin 2004/11/29

Http://www.ruby-cn.org/

1. What is RDT?

RDT (Ruby development tools), a set of Eclipse plug-ins, enables eclipse to support Ruby development.
Eclipse is a powerful cross-platform integrated development environment that supports development in Java, JSP, PHP, and other places.

For the advantages of the two, refer to Google or the link at the end of the article.

2. Install configurations

First, install the RDT plug-in. You can download it from the following URL and then install it.

After restarting eclipse, select new project. At this time, we can see a ruby.

This indicates that RDT has been installed. Before using RDT, you must specify the Ruby interpreter, open the preferences window, find the installed interpreters in Ruby, and click Add on the right, then add the location of your Ruby interpreter:

After confirmation, the interface is as follows:

 

 

 

 

3. Development Program

Then we can write the program. You can create a test. RB file as follows:

ClassTest

DefSayhello

Puts"Hello World"

End

End

T = test. New

T. sayhello

 

 

Right-click the file and choose run> RUN Ruby application.

 

 

The execution result is as follows:

 

 

 

If you want to debug, you can set the endpoint, and then debug it in the same way as developing a Java program. For example

 

 

 

 

4. Code Completion

Because Ruby is a dynamic language, it is difficult to implement Code Completion (Automatic completion or prompting). RDT provides only some basic things that can be used in the current class, most of them are syntactic things, such as defining methods and for loops.

In the prompt box that opens the code, CTRL + space is required. The system is dizzy. By default, you have to switch the input method, but you have to change the shortcut key for switching the input method. (This may cause problems because I am used to switching to English with Ctrl + space)

 

 

5. Connection:

RDT home: http://rubyeclipse.sourceforge.net/

Eclipse home: http://www.eclipse.org/

 

 

 

Copyright (c) <2004> liubin <liubin at huangpuzhuang dot com> 〉

This document is free of charge, based on the RDL (ruby-CN document license) V1.0 license
Released, you can spread (reposted) this document on the Internet without profit, but please keep all
Information (including this copyright notice); read the RDL license document carefully for other usage methods,
The latest version of this License can be found at http://www.ruby-cn.org/rdl.txt.pdf.

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.