Let’s start Ruby on Rails installation at Ubuntu

Recently, I started web application developing by Ruby on Rails. I had to configure and set ruby and rails environment in my PC.  You can install it system’s package management utilities. But I have prefer to install it using the Ruby Version Manager (RVM). It’s a actually a slick set of scripts that help you to install multiple versions of Ruby on your system. So, let’s start ..

First, you will have to install the some necessary tools and libraries. Open terminal and type the following line.

sudo apt-get install curl git-core build-essential zlib1g-dev libssl-dev libreadline5-dev

To install rvm, type . .

curl -L https://get.rvm.io | bash -s stable --ruby
Source the rvm script…

source ~/.rvm/scripts/rvm

Test that RVM works or not.

rvm notes

Now, you can begin ruby 2.2.0 installation.

rvm install 2.2.0

You can check available ruby version isntalled in your system

rvm list

If you multiple version install in your system, you will get something likes ad below

 
rvm rubies
 
=* ruby-2.1.2 [ x86_64 ]
   ruby-2.2.0 [ x86_64 ]
 
# => - current
# =* - current && default
#  * - default

Next, you will have to set any of them as the default version. In this case, i did the most latest one..

rvm use ruby-2.2.0 --default

Test your new ruby installation by typing following command.

ruby -v

So, Ruby installation is done. Let’s start Installing the latest version of Rails

gem install rails

Finally, install  some bindings:

sudo apt-get install libmysql-ruby libmysqlclient-dev
gem install mysql

Well. Everything is done so far. Now create new rails project.

rails new helloworld
 

Eftakhairul Islam

Hi, I'm Eftakhairul Islam, a passionate Software Engineer, Hacker and Open Source Enthusiast. I enjoy writing about technical things, work in a couple of startup as a technical advisor and in my spare time, I contribute a lot of open source projects.

 

3 thoughts on “Let’s start Ruby on Rails installation at Ubuntu

  1. Hey, your bash line is buggy…
    Pls change it as
    echo ‘[[ -s “$HOME/.rvm/scripts/rvm” ]] && . “$HOME/.rvm/scripts/rvm”‘ >> ~/.bash_profile

    1. Or just type
      [[ -s “$HOME/.rvm/scripts/rvm” ]] && . “$HOME/.rvm/scripts/rvm”
      in bashrc file NOT proceeding with “echo”

Leave a Reply

Your email address will not be published. Required fields are marked *

 

Read previous post:
Error at Codeigniter “No Input File Specified”

Sometimes life become hell for some unexpected errors. Well, this is not unexpected error, it can be   occurred if...

Close