Ruby On Rails在Ubuntu 12.04.1 LTS下的安装
Ubuntu 12.04.1 LTS Desktop下使用RVM进行RoR安装及配置。 1、安装 RVM 执行如下命令:
sudo apt-get install curl curl -L get.rvm.io | bash -s stable source ~/.rvm/scripts/rvm rvm requirements
应该会有类似提示:
Additional Dependencies: # For Ruby / Ruby HEAD (MRI, Rubinius, & REE), install the following: ruby: /usr/bin/apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config
根据提示执行如下命令:
rvmsudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config
2、安装Ruby 执行如下命令:
rvm install 1.9.3 #安装1.9.3版本,当然你也安装ree。 rvm use 1.9.3 –default #设置为默认
3、安装RubyGems、Rails及其他 执行如下命令:
rvm rubygems current gem install rails #要用的其他 gem install bundle gem install thin
4、检查及完成 执行如下命令:
ruby -v gem list
完成!