Develop Ruby applications using Eclipse and RDT
Liubin 2004/11/29
http://www.ruby-cn.org/
1. What is RDT
RDT (Ruby Development Tools), a set of Eclipse plugins such that Eclipse supports Ruby development. Eclipse is a powerful cross-platform integrated development environment that supports Java, JSP, PHP and other places.
About the advantages of both, you can refer to Google or Wen Dynasty.
2. Installation configuration
First, install the RDT plugin, you can download it from the URL under then, and then install it.
After restarting Eclipse, then select New Project, then we saw a ruby.
This shows that RDT has been installed, but we need to specify the Ruby interpreter before use, open the preferences window, find installed interpreters in Ruby, click Add, and then add your Ruby interpreter:
After the determination, the interface is as follows:
3. Development program
Then we can write the program. We can create a Test.rb file casually, as follows:
Class Test Def Sayhello Puts "Hello World" end end t = test.new t.sayhello
Then, click Right click on this file, select Run-> Run Ruby Application
The last execution result is as follows:
If you want to debug, you can set the endpoint, then, then the method of debugging and the development of the Java program, such as the following screenshots.
4. About code completion
Because Ruby is a dynamic language, the code is completed (automatically complement or prompt) is more difficult. RDT is only the basic some things that can be used in some current classes, most of which are syntax, such as definition method, for loop and many more.
Open this code to complete the prompt box to use Ctrl Space, faint, just the default to switch the input method, helplessly change the shortcut key of the switching input method. (This may cause problems, because I am used to switch to English with Ctrl Space
5. connection:
RDT Home: http://rubyeclipse.sourceforge.net/
Eclipse Home: http://www.eclipse.org/
Copyright (C) <2004> Liubin