I have installed rails and mysql. I have also installed mysql2 gem. I created a rails application by the command rails new try_cms -d mysql It was created successfully. Bu
sudo apt-get install libmysqlclient15-dev libmysqlclient15off libmysql-ruby
If you want something a little less intrusive, just set the DYLD_LIBRARY_PATH
environment variable in your MySQL's lib direction.
export DYLD_LIBRARY_PATH=$MYSQL_HOME/lib
I had similar problems. The solutio that worked for me was found here.
Just ran into this problem myself. Make sure you update the version numbers.
sudo install_name_tool -change libmysqlclient.18.dylib /usr/local/mysql/lib/libmysqlclient.18.dylib /Library/Ruby/Gems/1.8/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle
For some reason the mysql2.bundle file was not in my mysql2 gem. I ran
gem uninstall mysql2
and the gem was uninstalled. Then I immediately ran
sudo gem install mysql2
Then
sudo install_name_tool -change libmysqlclient.16.dylib /usr/local/mysql/lib/libmysqlclient.16.dylib /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle
Finally rails s
launched the server!
Try running this (see similar question here)
sudo install_name_tool -change libmysqlclient.16.dylib /usr/local/mysql/lib/libmysqlclient.16.dylib /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle