Sunday, July 11, 2010

"Error while running make" - Installing Ruby 1.8.7 using RVM

Recently, I have been playing around with RVM. I have had real trouble installing MySQL gem with Ruby 1.9.2 on Mac OS X. I haven't figured out a way to use MySQL gem with Ruby 1.9.2. So, I went backwards and tried installing Ruby 1.8.7. To my surprise, installation for Ruby 1.8.7 failed on RVM. I got frustrated. I was able to install Ruby 1.9.2 but not 1.8.7. I removed complete RVM setup (rvm implode) and re-installed RVM. I also tried installing different patch levels for Ruby. Still no success. It wasn't just happening.

After a bit of Googling, I came across this forum. I found my solution to install Ruby 1.8.7 on RVM.

The solution:

Install readline package
(rvm package install readline)

Remove prior ruby installation
(rvm remove 1.8.7)

Install ruby 1.8.7 with CONFIGURE option
(rvm install 1.8.7 -C --with-readline-dir=$HOME/.rvm/usr)

Finally, I had something running on RVM. :)

No comments: