Hi Guys,
this tutorial will show You how to install, manage and switch between “Rails 2” and “Rails 3” on Debian Lenny 5.0.8 and above…
The process should work “as is” on a fresh install and your user dispose of
the right permissions…
Hi Guys,
this tutorial will show You how to install, manage and switch between “Rails 2” and “Rails 3” on Debian Lenny 5.0.8 and above…
The process should work “as is” on a fresh install and your user dispose of
the right permissions…
First, we need to install some prerequisite stuff and we will provide do that
by executing this command on Terminal window:
$ sudo apt-get install subversion git-core autoconf bison sqlite3 zlib1g-dev libyaml-dev curl
Once this has been done we will provide to begin the installation of our ruby version manager
rvm pasting and executing the code below on a Terminal window:
$ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
After we should take a look to the post-installion tasks looking at the result of:
$ rvm notes
After rvm has been successfully installed we need to provide the amendment of our .bashrc. First, we need to look if there exist a line containing "return" and we need to substitute that one by:
if [[ -n "$PS1" ]] ; then
Next you scroll down until to the end of your .bashrc and you add this:
fi
Finally, you provide to give the path to rvm installation adding to the .bashrc:
[[ -s "/home/[YOURUSERNAME]/.rvm/scripts/rvm" ]] && source "/home/[YOURUSERNAME]/.rvm/scripts/rvm"
(Substitute your username instead of [YOURUSERNAME]) Now "rvm" should ready to work but we need before to open a new tab or close our Terminal window and open a new one. We check everything is fine giving this command:
rvm -v
This should show your rvm's version. After rvm's installation we can begin the installation of ours Rubies on Rails.
Installation of Rails2 This will begin by the installation of a supporting ruby version. So type now in terminal the following:
$ rvm install 1.8.7
After the task has been successfully done we select by rvm this ruby by:
$ rvm use 1.8.7
Now we can provide directly to Rail2's installation:
$ rvm gem install -v=2.3.8 rails
Check than your rails has been installed by:
$ rails -v
that should result in a href="rails 2.3.8" Is important now provide to reinstall the right rubygems version for our Rails2 by:
$ wget http://rubyforge.org/frs/download.php/74140/rubygems-1.5.0.tgz
$ tar zxvf rubygems-1.5.0.tgz
$ cd rubygems-1.5.0
$ ruby setup.rb
Check the version of rubygems is correct:
$ gem -v
Finally, you should provide to check your Rails2's installation is working by:
$ rails test
that should result in producing the usual Rails2 application's scheme.
$ rvm install 1.9.2-head
$ rvm use --default 1.9.2-head
$ ruby -v
$ rvm gem install --pre rails
$ rails -v
$ rails new ./testrails3
Do Not Forget to Take a Look..
Debian, Virtualization, Virtual Machine
Now Rails2 and Rails3 should both working together on your Debian :)
Sviluppo Siti Web
.
Good luck!
Davide
Tags: Command line, Console, Debian, Install, Linux, Rails, Shell, Terminal, Tutorial