安装ruby,包括thrift、eclipse插件、运行测试等步骤

1、下载并安装ruby20111229-1559-sfx.exe(E:\开发包)

把ruby加入环境变量Path中:e:\Ruby193\bin;

----------------------------

2、下载并双击解压DevKit-tdm-32-4.5.2-20110712-1620-sfx.exe(E:\开发包)

----------------------------

3、安装并测试,cd到步骤2的解压目录下:

----C:\DevKit>rubydk.rbinit

[INFO]foundRubyInstallerv1.9.3atC:/Ruby193

Initializationcomplete!Pleasereviewandmodifytheauto-ge

'config.yml'filetoensureitcontainstherootdirectories

oftheinstalledRubiesyouwantenhancedbytheDevKit.

----C:\DevKit>rubydk.rbinstall

[INFO]Updatingconveniencenoticegemoverridefor'C:/Ruby1

[INFO]Installing'C:/Ruby193/lib/ruby/site_ruby/devkit.rb'

----C:\DevKit>geminstallrdiscount--platform=ruby

Fetching:rdiscount-1.6.8.gem(100%)

TemporarilyenhancingPATHtoincludeDevKit...

Buildingnativeextensions.Thiscouldtakeawhile...

Successfullyinstalledrdiscount-1.6.8

1geminstalled

Installingridocumentationforrdiscount-1.6.8...

InstallingRDocdocumentationforrdiscount-1.6.8...

----------------------------

4、安装thrift

C:\DevKit>geminstallthrift

----------------------------

5、安装ruby的eclipse插件:

help->installnewsoftware->

路径:http://download.eclipse.org/technology/dltk/updates/

-->DynamicLanguagesToolkit(DLTK)2.0

-->DynamicLanguagesToolkit-RubyDevelopmentTools2.0.0.v20100505-1154-7G--E_EkMU3NHhvAUo0G

-->DynamicLanguagesToolkit-RubyDevelopmentToolsSDK2.0.0.v20090730-1127-4--84L23HCMnUW7RPoxKoq2YAFlN

----------------------------

6、在eclipse中设置ruby环境:

window->preference->Ruby->interpreters

addruby.exe,路径为步骤1的ruby开发包中(E:\Ruby193\bin\ruby.exe)

----------------------------

在eclipse运行rubytest:

右键单击/weiboTestAuto/test.rb,

runas->runconfigurations->rubyscript,

new一个configuration,在arguments中填入运行参数:

-stest/testRecmdServer.rb(测试ruby脚本)-rresource/testRecmdServerRes.rb(资源ruby脚本)-mgetUserList(方法名)-oabc(测试结果输出文件名)

run

相关推荐