Ruby1.9.2RC On Rails3RC -- RVM

[size=x-large][b]Ruby1.9.2RC On Rails3RC -- RVM [/b][/size]

1. Install ruby 1.9.2RC and rails3RC -- In rvm

You should install the git or ruby && gem

1) Install rvm with Git

> bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )



2) Install rvm with gem

>sudo gem install rvm

>rvm-install



3) Add this line to the end of .bashrc:
[ -s "$HOME/.rvm/scripts/rvm" ] && source "$HOME/.rvm/scripts/rvm"


The above will make the environment correct for all new terminal windows. In order to make the environment correct for the current terminal, execute this:
source "$HOME/.rvm/scripts/rvm"

4) Install ruby 1.9.2RC

> rvm install 1.9.2-head

> rvm 1.9.2-head
> ruby -v



5) Install rails3RC and dependences

> gem install tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18n

> gem install rails --pre

> gem install sqlite3-ruby



6) Install rspec 2.0.0beta

> gem install rspec --prerelease
> gem install rspec-rails --prerelease



7)Install bundler 1.0.0RC.2

> gem install bundler --prerelease



Done

Hopefully everything worked:

> ruby -v

ruby 1.9.2rc

> rails --version

Rails 3.0.0.RC

> gem list

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.0.beta)
actionpack (3.0.0.beta)
activemodel (3.0.0.beta)
activerecord (3.0.0.beta)
activeresource (3.0.0.beta)
activesupport (3.0.0.beta, 2.3.5)
arel (0.2.1)
builder (2.1.2)
bundler (0.9.7)
erubis (2.6.5)
i18n (0.3.3)
mail (2.1.3)
memcache-client (1.7.8)
mime-types (1.16)
mysql (2.8.1)
rack (1.1.0)
rack-mount (0.6.0, 0.4.7)
rack-test (0.5.3)
rails (3.0.0.beta)
railties (3.0.0.beta)
rake (0.8.7)
sqlite3-ruby (1.2.5)
text-format (1.0.0)
text-hyphen (1.0.0)
thor (0.13.3)
tzinfo (0.3.16)


Switching back to your system Ruby

rvm system


Back to your Rails3.0 environment

rvm 1.9.2-head


Use your RVM environment as your Default

rvm 1.9.2-head --default



2. Create a new app

> rails new AC_rails3 -d mysql

> cd AC_rails3

> bundle install

> rails server



3. Rspec

To configure your app to use rspec-rails, add a declaration to your Gemfile.
If you are using Bundler's grouping feature in your Gemfile, be sure to include
rspec-rails in the :development group as well as the :test group so that you
can access its generators and rake tasks.

#{RAILS_PATH}/Gemfile
Add

group :development, :test do
gem "rspec-rails", ">= 2.0.0.beta.19"
end


Be sure to run the following command in each of your Rails apps if you're
upgrading:

 > script/rails generate rspec:install


You should set config, let it autoload lib.

config/application.rb

config.autoload_paths += %W(#{config.root}/lib)



3. RESTful_authentication For Rails3

http://github.com/Satish/restful-authentication
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值