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