ROR 环境的 搭建

1)安装RUBY:
http://www.ruby-lang.org/en/ 下载 ruby182-15.exe,安装Ruby。
ruby -v 看是否安装成功。
2)安装RAILS框架 :
gem install rails --remotes
rails -v 看版本号,看是否成功安装。
3)安装 J2SDK 和Eclipse:
我安装了语言文件,用eclipse.exe -nl zh 实现中文化。
环境变量:  PATH:C:/j2sdk1.4.2_02/bin;
  添加CLASSPATH : C:/j2sdk1.4.2_02/lib/dt.jar;C:/j2sdk1.4.2_02/lib/tool.jar
java -version javac 看是否成功安装。
4)安装RDT(Ruby Development Tools):
help ->software updates->find an install ->search for new features to install
NEW remote site -> 填写RDT -> http://updatesite.rubypeople.org/nightly(最新版) OR http://updatesite.rubypeople.org/integration(稳定版本)
不要改动安装目录,我出现了不能加载的错误的提示。
开始安装,完成后重新启动Eclipse。
5)配置RDT
windows->Preference->Ruby->Installed Interpreters
添加RUBY语言编译器 :RUBY c:/ruby/bin/ruby.exe
其他是可选项。
6)启动RUBY视图:
windows ->open perspective ->other --->ruby
7) 数据库操作实现:
下载DBEDIT插件, http://prdownloads.sourceforge.net/dbedit/dbedit_1.0.3.bin.dist_3.X.zip?use_mirror=nchc
解压缩到eclipse安装目录
注意把eclipse32/configuration/org.eclipse.core.runtime删掉,更新插件。
下载 MYSQL的 JDBC http://dev.mysql.com/downloads/connector/j/3.1.html
解压到C:/java/drivers
windows->show View ->other ->dbedit ->tables 右键 new Connection
CLASSPATH : C:/java/drivers/mysql-connector-java-3.1.14
8) ROR环境配置:
run->external tool ->external tool
program ->new
名称:新建ROR工程
修改 Main 选项卡: location : c:/ruby/bin/rails.cmd; working directory : ${project_loc} ;arguments :../${project_neme} (在变量中自己选取)
修改refresh选项卡 :选中所有;
修改COMMON选项卡: external tools 选中。
实现ROR Model层:
名称:新建Model
修改 Main 选项卡:location : c:/ruby/bin/ruby.exe; working directory : ${project_loc} ;arguments :script/generate model ${string_prompt:Model name} -f (在变量中自己选取)
实现ROR CONTROLLER层:
名称:新建Controller
修改 Main 选项卡:location : c:/ruby/bin/ruby.exe; working directory : ${project_loc} ;arguments :script/generate controller ${string_prompt:controller name} -f (在变量中自己选取)
实现ROR 支架系统:
名称:新建Scaffold
修改 Main 选项卡:location : c:/ruby/bin/ruby.exe; working directory : ${project_loc} ;
arguments :script/generate scaffold ${string_prompt:Model name} ${string_prompt:controller name}${string_prompt:actions separated with spaces} -f (在变量中自己选取)
实现ROR VIEW层:
安装WTP插件:
WTP:download.eclipse.org/webtools/updates/ 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值