用rvm安装rails 3.0
系统:ubuntu
当前RoR版本
zhanghong@zh-desktop:~$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
zhanghong@zh-desktop:~$ rails -v
Rails 2.3.5
1安装rvm
mkdir -p ~/.rvm/src/ && cd ~/.rvm/src && rm -rf ./rvm/ && git clone --depth 1 git://github.com/wayneeseguin/rvm.git && cd rvm && ./install
zhanghong@zh-desktop:~$ rvm -vrvm 0.1.38 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]
rvm update --head
sudo apt-get install curl libcurl3 libcurl3-dev
zhanghong@zh-desktop:~$ rvm install 1.9.1................zhanghong@zh-desktop:~$ rvm listrvm rubies ruby-1.9.1-p378 [ i386 ]
zhanghong@zh-desktop:~$ ruby -vruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]zhanghong@zh-desktop:~$ rvm 1.9.1zhanghong@zh-desktop:~$ ruby -vruby 1.9.1p378 (2010-01-10 revision 26273) [i686-linux]
rvm gemdir
gem install tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18ngem install rails --pre
zhanghong@zh-desktop:~$ rails -vRails 3.0.0.beta4#创建项目zhanghong@zh-desktop:~/workspace$ rails new topscore -d mysql
zhanghong@zh-desktop:~/workspace/topscore$ rails startCould not find gem 'mysql (>= 0, runtime)' in the gems available on this machine.Try running `bundle install`.zhanghong@zh-desktop:~/workspace/topscore$ bundle install mysqlFetching source index from http://rubygems.org/Using rake (0.8.7) from system gems Using abstract (1.0.0) from system gems Using activesupport (3.0.0.beta4) from system gems Using builder (2.1.2) from system gems Using i18n (0.4.1) from system gems Using activemodel (3.0.0.beta4) from system gems Using erubis (2.6.5) from system gems Using rack (1.1.0) from system gems Using rack-mount (0.6.3) from system gems Using rack-test (0.5.4) from system gems Using tzinfo (0.3.22) from system gems Using actionpack (3.0.0.beta4) from system gems Using mime-types (1.16) from system gems Using polyglot (0.3.1) from system gems Using treetop (1.4.8) from system gems Using mail (2.2.3) from system gems Using actionmailer (3.0.0.beta4) from system gems Using arel (0.4.0) from system gems Using activerecord (3.0.0.beta4) from system gems Using activeresource (3.0.0.beta4) from system gems Using bundler (0.9.26) from system gems Installing mysql (2.8.1) from rubygems repository at http://rubygems.org/ with native extensions Using thor (0.13.6) from system gems Using railties (3.0.0.beta4) from system gems Using rails (3.0.0.beta4) from system gems Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.zhanghong@zh-desktop:~/workspace/topscore$ bundle showGems included by the bundle: * abstract (1.0.0) * actionmailer (3.0.0.beta4) * actionpack (3.0.0.beta4) * activemodel (3.0.0.beta4) * activerecord (3.0.0.beta4) * activeresource (3.0.0.beta4) * activesupport (3.0.0.beta4) * arel (0.4.0) * builder (2.1.2) * bundler (0.9.26) * erubis (2.6.5) * i18n (0.4.1) * mail (2.2.3) * mime-types (1.16) * mysql (2.8.1) * polyglot (0.3.1) * rack (1.1.0) * rack-mount (0.6.3) * rack-test (0.5.4) * rails (3.0.0.beta4) * railties (3.0.0.beta4) * rake (0.8.7) * thor (0.13.6) * treetop (1.4.8) * tzinfo (0.3.22)zhanghong@zh-desktop:~/workspace/topscore$ rails server=> Booting WEBrick=> Rails 3.0.0.beta4 application starting in development on http://0.0.0.0:3000=> Call with -d to detach=> Ctrl-C to shutdown server[2010-06-09 17:37:41] INFO WEBrick 1.3.1[2010-06-09 17:37:41] INFO ruby 1.8.7 (2009-06-12) [i686-linux][2010-06-09 17:37:46] INFO WEBrick::HTTPServer#start: pid=6283 port=3000
zhanghong@zh-desktop:~$ rvm listrvm rubies=> ruby-1.9.1-p378 [ i386 ]zhanghong@zh-desktop:~$ rvm systemzhanghong@zh-desktop:~$ ruby -vruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]