Install and configure Ruby and rails 3 using rvm in Ubuntu 10.10

Source: Internet
Author: User

Because the system was reinstalled, we tried to use rvm to install and manage Ruby and rails and record the installation process.

 

Install curl first

 

 

Shell code
  1. $ Sudo apt-Get install curl

 

Because the rvm Installation File is obtained from GitHub through git, a local git is also required. I installed it through build, you can also install the SDK directly from APT using the following command.

 

 

Shell code
  1. $ Sudo apt-Get install Git-core

 

Install rvm

 

 

Shell code
  1. $ Bash <(curl http://rvm.beginrescueend.com/releases/rvm-install-head)

 

After the installation is complete, configure the startup environment and modify ~ /. Add the bashrc File

 

 

Java code
  1. # Add rvm
  2. If [[-s "$ home/. rvm/scripts/rvm"]; then
  3. Source "$ home/. rvm/scripts/rvm ";
  4. Fi

 

In the new terminal, you can see whether the rvm has been successfully installed:

 

 

Shell code
  1. $ Rvm notes

 

You can see some information about the rvm displayed on the screen.

After installing rvm, you can use TA to install and manage Ruby. Run the following command to install Ruby 1.9.2:

 

 

Shell code
  1. $ Rvm install 1.9.2

 

* The download of the Ruby package is too slow, and it is always interrupted. You can download ruby-1.9.2-p0.tar.bz2 with the tool and manually place it in ~ /. Rvm/archives directory. Then run this command to decompress and install it.

 

Set Ruby of this version as the default

 

 

Java code
  1. $ Rvm -- default ruby-1.9.2-ruby-1.9.2-p0

 

After compilation and installation are complete, run the following command to test

 

 

Java code
  1. $ Ruby-V

 

If the following information is displayed on the screen, the installation is successful.

Ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]

 

Install rails 3

 

 

Shell code
  1. $ Gem install rails

 

Run the rails-V test.

 

Shell code

  1. $ Rails-V

 

The latest version of rails 3.0.3 is displayed.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.