linux下rvm,ruby,rails安装
rvm:sudo apt-get install curl sudo apt-get install git-coresudoapt-get install libssl-dev(否则gem不能使用)sudoapt-get install libxslt-dev libxml2-dev (不装bundle install会出错)sudoapt-ge
rvm:
sudo apt-get install curl
sudo apt-get install git-core
sudo apt-get install libssl-dev(否则gem不能使用)
sudo apt-get install libxslt-dev libxml2-dev (不装bundle install会出错)
sudo apt-get install libmysql-ruby libmysqlclient-dev(用于mysql)
sudo apt-get install libsqlite3-dev(用于sqlite)
sudo apt-get install zlib1g-dev(否则不能创建工程)
sudo apt-get install nodejs(一定要不然会报ExecJS::RuntimeError in Welcome#index错误)
sudo apt-get install g++ (安装thin,eventmachine之类的时候会用到)
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
source /home/larry/.rvm/scripts/rvm
ruby:
rvm install ruby 1.9.2 or rvm install jruby-1.7.0.preview1
rvm --default use 1.9.2 or rvm --default use jruby
ruby -v
rails:
gem -v
gem update --system
gem update
gem install rails
rails -v
rails new
淘宝提供Rubygems的国内镜像站:http://ruby.taobao.org/
- gem sources -a http://ruby.taobao.org/
- gem install rails
- source 'http://rubygems.org'
- source 'http://ruby.taobao.org/'
更多推荐
所有评论(0)