1) Install Ruby
sudo apt-get install ruby rdoc irb libyaml-ruby libzlib-ruby ri libopenssl-ruby ruby1.8-dev
2) Install RubyGems via source (recommended):
wget http://rubyforge.org/frs/download.php/29548/rubygems-1.0.1.tgz
tar xzvf rubygems-1.0.1.tgz
cd rubygems-1.0.1
sudo ruby setup.rb
ln -s /usr/bin/gem1.8 /usr/bin/gem
sudo gem update --system
2)(alternate) Install RubyGems from ubuntu repository and update it (not recommended because apt-get will complain about files changed by gem update --system):
sudo apt-get install rubygems
sudo gem update --system
3) Install Rails and it's dependencies (with RubyGems)
sudo gem install rails -y
Here is a good time to install any gems you may need.
4) Create your first Rails app, as the current user (i.e., no sudo):
$ rails /path/to/new/railsapp
Of course, replace /path/to/new/railsapp with the path to the location where you'd like the source code for your new Rails application to exist. This can be /home/myhome/rails/myapp.
Reference: https://help.ubuntu.com/community/RubyOnRails
No comments:
Post a Comment