安装配置Ruby for Eclipse
2009-11-04 09:01
274 查看
安装配置Ruby for Eclipse
document.body.oncopy = function() {if (window.clipboardData) {
setTimeout(function() {
var text = clipboardData.getData("text");
if (text && text.length>300) {
text = text + "/r/n/n本文来自CSDN博客,转载请标明出处:" + location.href;
clipboardData.setData("text", text);
}
}, 100);
}
}
function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}
一、安装前的准备工作:
1. 下载Ruby:http://www.ruby-lang.org/en/downloads/
2. 下载RDT(Ruby Development Tools) for Eclipse:http://sourceforge.net/project/showfiles.php?group_id=50233
3. 下载RadRails for Eclipse:http://update.aptana.com/install/rails/3.2/
建议大家尽量把所有插件都下载回来再安装,原因很简单,用Eclipse的New Remote Site安装时经常会因为网络问题安装不下去。下载下来再安装就方便多了。
二、安装Ruby环境及插件:
1. 安装Ruby解释器:直接双击下载下来的EXE文件,按安装向导安装即可;
2. 安装Rails:在CMD窗口中输入以下命令"gem install rails --include-dependencies
";
2. 安装RDT插件:在Eclipse>Help>Software updates>Find and install...>Search for new feature to install>New local Site
下,选择RDT插件的解压目录,按向导指示安装插件;
3. 安装RadRails插件:在Eclipse>Help>Software updates>Find and install...>Search for new feature to install>New local Site
下,选择下载的文件,按向导指示安装;
三、配置Ruby环境:
1. 我使用的Ruby版本是1.86,Eclipse版本是3.3.1,安装完成基本上不用再做任何配置,打开Eclispe>Windowns>Preferences>Ruby>Installed Interpreters
,可以看到缺省已经设置了JRuby做为虚拟机;
2. 如果你希望使用原生的Ruby做为虚拟机,则可以点击“Add”按钮设定Ruby的运行目录。到此时设置即告完成,不必像先以前的版本那样设置其它的系统路径。
四、Hello Ruby:
1. 选择菜单Eclispe>New>Project>Ruby>Ruby project
,建立一个Ruby工程“HelloRuby”;
2. 在新建的Ruby工程上右击鼠标,选择New>Ruby Class,建立一个新的Ruby类,类名为HelloRuby;
3. 在新类中写入下列代码,Hello Ruby就完成了。在工程上右击菜单Run as>Ruby Application
即可输出结果。
class HelloRuby
"
Hello Ruby!
"
end
相关文章推荐
- 安装配置Ruby for Eclipse
- 安装配置Ruby for Eclipse
- Ruby for Eclipse安装配置
- Debian 7 配置安装Java jdk及Eclipse for C/C++
- Eclipse IDE for C/C++ Developers安装配置详解,让你用Eclipse开发C/C++ .
- Eclipse IDE for C/C++ Developers安装配置详解,让你用Eclipse开发C/C++
- PHP开发工具 Eclipse for PHP Developers安装、配置
- Linux下安装配置Eclipseforphp
- Pydev for eclipse 安装及配置
- ibatis的ibatorForEclipse的安装与配置和ibator的错误日志查看
- Hibernate for Eclipse3.2 安装配置使用
- ArcGIS for Android 在Eclipse上的安装配置 (上:下载篇)
- ArcGIS for Android 在Eclipse上的安装配置 (上:下载篇)
- 在Ubuntu 10.10下安装配置Eclipse for PHP Developer
- Swt Designer For Eclipse3.3的安装配置方法
- OpenLaszlo 3.2 IDEforLaszlo 0.2.0(Eclipse 3.1) 的安装配置过程
- 最新版Eclipse IDE for C/C++以及MinGW的安装与配置详解
- Eclipse IDE for C/C++ Developers和MinGW安装配置C/C++开发学习环境详解
- eclipse+pydev+Django安装和配置Python开发环境(For Windows OS)
- Eclipse IDE for C/C++ Developers安装配置详解