Once you done installing ruby, lets connect to the next link in the chain :RAILS Installation.
Ruby programs comes in small modules called gems, which are self-contained packages of Ruby Code.
Since gems with different version numbers may cause some conflict, it's preferable to separate gemsets, which are self-contained budles of gems or simply Repository of Ruby Extensions.
So, to create two different gem sets one for each rail version do the following:
$ rvm --create 1.8.6@rails2 # or $ rvm --create 1.8@chantu
$ rvm --create use 1.9.2@rails3 # or $ rvm --create 1.9.2@bhantu
first command create the gemsets rails2 associated with Ruby 1.8.6 while the second command creates the gemsets rails3 associated with Ruby 1.9.2 and uses it at the same time.
To use Ruby 1.9.2 and Rails 3 by default :
$ rvm --default use 1.9.2@rails3 # This sets the default Ruby to 1.9.2 and default gemset to rails3
Got Lost?
$ rvm --help
$ rvm gemset --help
Insall RubyGems
RubyGems: Package Mannager for Ruby projects. You can access those tons of ruby/rails extension to further enhance the productivity of your rails app had you have this.
So, lets get it first.
wait....
since you've installed RVM , you already got it. Bingo...
confirm:
sahilsk@dragonaider:~/cronfarm$ which gem
/home/sahilsk/.rvm/rubies/ruby-1.9.2-p0/bin/gem
If you don't have it, go and download RubyGems, extract it and then go to the rubygems directory and run the setup file
$ [sudo] ruby setup. rb # here sudo tag is optional
update your repo : RubyGems
$ gem update --system
Finally the moment you all waited so long . Yes, Installation of RAILS
$ gem install rails --version 3.0.0 # or simple || $ gem install rails || # gem will get the latest version for you.
Confirm:
$ rails v
Rails 3.0
No comments:
Post a Comment