Build a Ruby on Rails 2.3.5 development environment in Ubuntu 10.10

Source: Internet
Author: User
Tags ruby on rails

After Ubuntu is installed, it is time to configure the Ruby on Rails 2.3.5 development environment. First, ensure that your current Ubuntu can be connected to the Internet.

Ruby1.8.7 installation:
Run the following command on the terminal:
Sudo apt-Get install Ruby rdoc ri
Ruby-V view Ruby version

Then install the ruby package management system (rubygems ).
Sudo apt-Get install rubygems
Gem install rubygems-Update
Gem update
View gem-V
#1.3.5

Rails installation:
Sudo gem install rails-V = 2.3.5
Check the version after each rails component is installed.
Rails-V
At this time, you may see that the system prompts that rails is not found. This is because rails is not added to the path. Execute:
Export Path = $ path:/var/lib/gems/1.8/bin

Source/etc/profile
Now let's take a look at rails-v.

Yes #2.3.5

Sqlite3 Installation
But considering that the development environment uses the database sqlite3, you need to install sqlite3 and execute the following command:
Sudo apt-Get install sqlite3 libsqlite3-dev
Sudo gem install sqlite3-ruby

The installation is complete!

 

Ruby compilation source code Tutorial:

You must first install two packages: libtool and yaml. Then perform the following compilation

$ Tar xvzf ruby-1.9.2-p0.tar.bz2

$ Ruby-1.9.2-p0 CD

$./Configure-Prefix =/usr/local/Ruby # specify the installation path

$ Make & sudo make install

$ Sudo ln-S/usr/local/Ruby/bin/Ruby/usr/bin/Ruby

$ Sudo ln-S/usr/local/Ruby/bin/gem/usr/local/gem

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.