zoukankan      html  css  js  c++  java
  • 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/ 
  • 相关阅读:
    小波变换的引入,通俗易懂
    Leetcode 437. Path Sum III
    Leetcode 113. Path Sum II
    Leetcode 112 Path Sum
    Leetcode 520 Detect Capital
    Leetcode 443 String Compression
    Leetcode 38 Count and Say
    python中的生成器(generator)总结
    python的random模块及加权随机算法的python实现
    leetcode 24. Swap Nodes in Pairs(链表)
  • 原文地址:https://www.cnblogs.com/mengfanrong/p/3848586.html
Copyright © 2011-2022 走看看