Install Rails 3 on Linux Mint 10


Hai Friends,

lets see “How to install Rails3 in Linux Mint 10

First we have to install all of the necessary tools and libraries:


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

Install ruby 1.9.2 using RVM:


 $ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )

In Linux Mint 10, there is no “.bashrc” file. So we have to create a .bashrc file and add the following line


 $ sudo touch .bashrc (ubuntu peoples leave this step)

 $ sudo gedit .bashrc

(Add the following line into .bashrc file)

 if [[ -s "$HOME/.rvm/scripts/rvm" ]]  ; then source "$HOME/.rvm/scripts/rvm" ; fi

Close your terminal and open a new one, then run the following to test RVM install:


 $ rvm notes

Next, we can begin ruby 1.9.2 installation by running:

 $ rvm install 1.9.2

This install will take up to some minutes and once it completes you have to set ruby 1.9.2 as the default version:

 $ rvm --default ruby-1.9.2

Then you can test your new ruby install:

  $ ruby -v

And now, to install Rails 3 simply type in your terminal:

$ gem install rails

Now we have to install musql2 for ruby


 $ sudo apt-get install libmysql-ruby libmysqlclient-dev

 $ gem install mysql2

Now we’ll give new install a test by creating a test application:

By defaultRails” comes with built-in support for  “sqlite3-ruby”. But by using ” -d mysql “, it’ll connect with “mysql


 $ rails new test_new -d mysql

Make sure you are in our test_new  directory and run:


 $ rails server

 (or)

 $ rails s

That’s all !!!

If you have any doubt, feel free to ask me 🙂

Hai Friends,lets see “How to install Rails3 in Linux Mint 10“First we have to install all of the necessary tools and libraries:


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

Install ruby 1.9.2 using RVM:


$ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )

In Linux Mint 10, there is no “.bashrc” file. So we have to create a .bashrc file and add the following line


$ sudo touch .bashrc

$ sudo gedit .bashrc

(Add the following line into .bashrc file)

$ if [[ -s "$HOME/.rvm/scripts/rvm" ]]  ; then source "$HOME/.rvm/scripts/rvm" ; fi

Close your terminal and open a new one, then run the following to test RVM install:


$ rvm notes

Next, we can begin ruby 1.9.2 installation by running:

$ rvm install 1.9.2

This install will take up to some minutes and once it completes you have to set ruby 1.9.2 as the default version:

$ rvm --default ruby-1.9.2

Then you can test your new ruby install:

 $ ruby -v

And now, to install Rails 3 simply type in your terminal:

$ gem install rails

Now we’ll give new install a test by creating a test application:


$ rails test

Now we have to install musql2 for ruby


$ sudo apt-get install libmysql-ruby libmysqlclient-dev

$ gem install mysql2

Make sure you are in our test  directory and run:

Advertisements

3 thoughts on “Install Rails 3 on Linux Mint 10

  1. Hi Luca,

    Thanks for the information. But both the command downloads the same bin file, in different names. 🙂
    I checked it using “diff” command.

    Feel free to ask if you have any doubts. 🙂

    Warm Regards,
    Tha.Suresh

  2. Hi,

    Any idea why I’m getting this output from the ~/.bashrc? My .bashrc reads:

    if [[ -s “$HOME/.rvm/src/rvm/scripts/rvm” ]] ; then source “$HOME/.rvm/src/rvm/scripts/rvm” ; fi

    Output:
    $HOME/.rvm/src/rvm/scripts/rvm: line 11: syntax error near unexpec’ed token `
    bash: /home/bzitzow/.rvm/src/rvm/scripts/rvm: line 11: `if (( ${rvm_ignore_rvmrc’=0} == 0 ))

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s