---
title: "Ruby环境搭建与hello world"
author: "simgsg"
date: "2011-04-12T11:12:00Z"
tags: []
slug: "ruby-hello-world"
draft: false
lastmod: "2011-07-10T13:20:47Z"
id: 1120945
url: "https://simgsg.iteye.com/blog/1120945"
---

1.ruby环境的安装
a).首先下载安装rubyinstaller-1.8.6-p398.exe,完成ruby运行环境和环境变量的配置工作.输入ruby -v屏幕显示版本,安装成功
b).下载安装Myeclipse6版本,或者eclipse内核为3.3.2
c).其次安装aptana_update_024747.zip插件, find and install-&gt;new Archivedsite
d).接着安装rdt插件 org.rubypeople.rdt-0.9.1.200711131528NGT.zip,find and install-&gt;new Archivedsite,Ruby Mylyn Connector Feature 为可选项,建议不勾选.
e).最后安装rails插件org.radrails.rails_feature-1.2.1.23268-278787EUNvWohWG-fz0019H9P9Y9.zip, find and install-&gt;new Archivedsite,rails插件依赖于rdt插件,建议安装1.2版本否则将出现不兼容问题,可能导致eclipse插件库崩溃
e).全部安装完成后打开myeclipse窗口项目进入ruby设置,配置相应的环境即可.
2.hello world示例
打开新建项目选择ruby,其他默认,新建文件src/test.rb,打开编写代码:
print "hello world /n"
右选run-&gt;Ruby Application 控制台打印