Install Ruby on Rails on Ubuntu server
This article shows how to install
rails on Ubuntu through
We are going to install Ruby through
Install some dependencies for Ruby
The following set of dependencies just below contains everything you need to run Rails application on Ubuntu server. Look at them carefully.
We prefer here to use
rbenv instead of
RVM to its permissions management.
Let’s clone rbenv in
Now we will add
~/.rbenv/bin to our
$PATH for access to the rbenv command-line utility.
Add rbenv init to your shell to enable shims and autocompletion.
Installing ruby-build as an rbenv plugin will give you access to the rbenv install command.
Install Ruby versions
rbenv offers some useful command like
install. Install the ruby version that suits you as simple
as that :
Set the global version of Ruby
Installs shims for all Ruby executables known to rbenv (i.e., ~/.rbenv/versions//bin/). Run this command after you install a new version of Ruby, or install a gem that provides commands.
$> rbenv rehash
Now Ruby is installed, you can install rails by typing :
You don’t need to specify
--no-rdocevery time you install a gem in production: just add
gem: --no-rdoc --no-rito
~/.gemrc(create that file if it doesn’t already exist) and don’t worry about ri or rdoc again in production.