How to get past the `require’: no such file to load — mkmf (LoadError) when installing the “mysql” gem
- 10 Comment
Welcome back!
Google Query: extconf.rb:1:in `require’: no such file to load — mkmf (LoadError)
After some of my readers tried my tutorial on “How to install ruby on rails in Ubuntu Gutsy Gibbon (7.10)” they ran into some trouble installing the “mysql” gem. I finally found the answer after some Googling at Mentalized.net. The summary is below.
“mkmf.rb” is part of the “ruby1.8-dev” package. Since I already had this package installed on my system, I was not experiencing the error. I installed a fresh copy of Ubuntu Gutsy Gibbon (7.10) in VMware and sure enough, I encountered the error when installing the “mysql” gem.
-You need to install the “ruby1.8-dev” package by typing the following in the Terminal:
sudo apt-get install ruby1.8-dev
-You should be able to go ahead and install the “mysql” gem now by typing the following in the Terminal:
sudo gem install mysql
I apologize if you were getting that error when you followed my previous tutorial. The tutorial has been updated with this information. Happy Coding!
Technorati Tags: Ubuntu, Ruby on Rails
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.
10 Comments on this post
Trackbacks
-
jamslug said:
Thanks a lot, it works perfect!
June 16th, 2008 at 7:20 am -
Jithesh said:
Thanks man I was struggling with this I was searching for this ans Now my rail works fine thanks again
July 24th, 2008 at 2:38 am -
hstagner said:
I am glad that I could help.
Thank you for reading!
Regards,
Harley Stagner
July 24th, 2008 at 8:24 am -
bv said:
Thank you Hstagner,
Now it forks for me on my vmWare ubuntu image.
regards,November 28th, 2008 at 7:42 am -
elvy said:
Thanks!!!!!
December 27th, 2008 at 1:13 pm -
Felippe Silvestre said:
Wow!!!
\o/
||
_/ \_Thanks a lot for this little but precious information!
June 13th, 2009 at 1:00 am -
Chris said:
OMFG! Thank you! I was lost without it. You really helped in my hour of need. Cheers!
January 2nd, 2010 at 4:42 am -
Johan Hernandez said:
You may sometimes found some errors compiling, install the package ‘libmysqlclient’ too(Ubuntu 10.04)
Great info, thanks.March 4th, 2010 at 11:25 am -
boourns said:
worked for me – thanks.
May 31st, 2010 at 9:53 pm


[...] when installing the mysql gem, so Googling for the solution wasn’t instant. Luckily I found this post which showed the missing package: [...]