1. First install some basic library apt-getinstallcurlgit-corebuild-essentialzlib1g-devlibssl-devlibreadline5-dev2. then install ruby Virtual Machine bash & lt; (curl-shttps: // rvm.beginrescueend.com/install/rvm) Thenaddth
1. First install some basic Libraries
apt-get install curl git-core build-essential zlib1g-dev libssl-dev libreadline5-dev
2. Install the ruby virtual machine.
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
Then add this line as the last line in your .bashrc:
If [[-s "$ HOME /. rvm/scripts/rvm "]; then source" $ HOME /. rvm/scripts/rvm "; fi is generally automatically added, you only need to re-load the configuration file (.. bashrc)
3. view the rvm instructions and install the Library mentioned in the instructions.
rvm notes
4. Install ruby
rvm install 1.9.2
5. Set the default ruby version
rvm --default ruby-1.9.2
6. Confirm the ruby version.
ruby -v
7. Install rails 3.1.0 because mysql 5.1 is used at the time, and rails Versions later than 3.1 are compatible with it.
You need to switch to the Super User for installation, but root does not have the rvm environment, so first use the current user environment for root:
Env>/tmp/. env switch to root and load the Environment File:./tmp/. env. then install
gem install rails --pre --version 3.1.0.rc1
8. Install mysql
Sudo apt-get install mysql-server libmysqlclient15-dev
9. For testing, see the official guide.
rails testapp
rails s