• Happy Coding

no such file to load — mysql

I got the error

no such file to load — mysql

when running my Rails application. After that i tried to install the mysql gem module using

sudo gem install mysql

but it gave me an error saying:

ERROR:  Error installing mysql:
ERROR: Failed to build gem native extension.

I then included a parameter to the install command which showed the path to the mysql_config file

sudo gem install mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config

That did the trick.

  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Ma.gnolia
  • MisterWong
  • Reddit
  • SphereIt
  • StumbleUpon
  • Technorati
  • TwitThis
  • Yigg
  • LinkedIn
  • Print this article!
  • Tumblr
  • Pownce
Share your opinion! Post your thoughts.