Install RubyonRails in Ubuntu

Source: Internet
Author: User
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
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.