Rails installation failing Ubuntu

“Here is your solution to Rails installation failing Ubuntu.”

I have setup a Ruby on Rails developer several times on all the major operating systems (Linux, Windows and Mac OS X). I usually find it easier to build the environment on Mac OS X, more difficult on Windows but tiring and time consuming on Linux.

After a lot troubleshooting I came out with the conclusion that the issues are caused because of missing libraries. Most of the times what is missing are the development dependencies of ruby.

If you use RVM you can simply type the following command and get back the missing libraries:

rvm requirements

And then you can do sudo apt-get install missing_libraries

Alternatively you can install the following libraries/components:

sudo apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev autoconf libc6-dev ncurses-dev automake libgmp-dev libtool

Most probably this will resolve your issue. If it does this means your rails installation fail was surely caused by the Ruby C dependency.

If not feel free to comment and we will resolve this together.

Discussions — No responses yet