How to configure the Ruby on Rails development environment under the Ubuntu system

Source: Internet
Author: User
Tags readline ruby on rails

The use of Ruby on Rails in Linux can make it easier to maintain and develop Web applications, allow developers to focus more on the logical structure of the system, and configure the Ruby on Rails development environment before use, and the following small series will introduce Ubuntu 12.04 How to configure the Ruby on Rails development environment.

Ubuntu 12.04 + Ruby 2.0 + Rails 3.2.13

1, the installation system needs the package

$ sudo apt-get install-y build-essential OpenSSL curl libcurl3-dev libreadline6 libreadline6-dev git zlib1g zlib1g-dev li Bssl-dev libyaml-dev libxml2-dev libxslt-dev autoconf automake libtool imagemagick libmagickwand-dev Libpcre3-dev Libsqlite3-dev Libmysql-ruby Libmysqlclient-dev

2. Installation RVM

After the installation RVM succeeded,

Then, load the RVM environment (the new open termal do not have to do so, will automatically reload)

$ source ~/.RVM/SCRIPTS/RVM

Check to see if the installation is correct

# Install ReadLine Package $ RVM pkg Install ReadLine

# Install Ruby 2.0.0$ RVM Install 2.0.0--with-readline-dir= $RVM _path/usr

4. Set Ruby version

$ RVM 2.0.0--default

Test is correct

$ ruby-v

Ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.3.0]

$ gem-v

2.0.0

5. Install Rails Environment

$ gem Install bundler Rails

Test installation is correct

$ bundle-v

Bundler version 1.0

$ rails-v

Rails 3.2.13

6, install MySQL

$ sudo apt-get install mysql-server mysql-client//Keep in mind the password entered during installation $ sudo apt-get install libmysql-ruby Libmysqlclient-dev

$ gem Install MYSQL2

View Gem Package gem list

The above is the Ubuntu build Ruby on Rails development environment Introduction, need to install RVM, install ruby Environment, install rails environment, install MySQL finally.

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.