Ruby on Rails 学习笔记 1 环境

ruby的安装

系统存在多个ruby版本的情况下,建议使用rvm

Install rvm

$ bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)

Load RVM into your shell sessions as a function 其实就是在.bash_profile里写一句话

user$ echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile

Reload shell Configuration

user$ source .bash_profile

  

Install ruby with rvm

user$ rvm install 1.9.2

select ruby version

user$ rvm use 1.9.2
user$ rvm use system
 

安装rails

user$ gem install rails
 

安装bundler

user$ bundle install
 

猜你喜欢

转载自guthrie.iteye.com/blog/1133419