Some Problems I faced while configuring rails and ruby-gems in ubuntu

June 10, 2008

Facing problems while configuring anything in linux is a normal thing .. may be its boring and tiring .. but its really interesting when you solve them..

As a linux  starter i face some problems while configuring ruby on rails environment for linux .. Here they are

Note : Sure before any thing you need to get ruby and rails installed

  • sudo apt-get install ruby
  • sudo apt-get install rubygems
  • gem install rails –include-dependencies

1.Problem :Any Gem that lets you choose between mswin32 and ruby ( and of course you choose ruby ) is installed

  • Solution : Simply this happens because these gems require compilation so just give them the tool
    • sudo apt-get install g++ ( Now you are done and can work )

2.  Problem : While Installing A gem it tells you this: Could not create Makefile due to        some necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

  • Solution : This Happens because the ruby1.8-dev required library is not installed so simply
    • sudo apt-get install ruby1.8-dev Done

3. Problem : Always installing rmagick gem is a problem but i think its solution in linux is more simple than windows

  • Solution : 3 Steps ( Download imagicmagick , The Lib Magick library , Then the Gem )

    • sudo apt-get install imagemagick
    • sudo apt-get install libmagick9-dev
    • gem install rmagick

4. Problem : The great Problem of the file ( /tmp/mysql.sock ) which makes you not able to use rake db:migrate or any other access to the mysql databases

  • Solution : This Problem arises as the mysql.sock file location and a name has changed during newer versions to be installed in this silly location ( /var/run/mysqld/mysqld.sock) . Really Boring… So now we have to make a symbolic link and also change the name so do this
    • ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock

These Problems were very annoying and tiring for me and i hope it helps


Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s

%d bloggers like this: