Thanks for taking a look at this.
I started a beginner\'s tutorial on RoR through lynda.com. I followed the instructions to the letter. Everything was working so far
Correct way that worked for me was:
cd ~ [command]
nano .bash_profile [command]
add this line of code:
export DYLD_LIBRARY_PATH="/usr/local/mysql/lib:$DYLD_LIBRARY_PATH"
ctrl+x [save]
y [yes]
cd Sites/sitename/ [command]
rails server [run WEBrick server]
and you should get this message:
=> Booting WEBrick
=> Rails 3.2.11 application starting in development on localhost:3000
=> Call with -d to detach
Run these at the terminal:
gem install bundler
bundle
And then you should be able to boot the server.
Edit: You should really look into using rvm to manage your ruby installs and gemsets. It'll save you a lot of time and effort in installing them too.
I ran into the same problem as you (also attempting to go through the Lynda course), and also being a newbie I got pretty frustrated pretty quickly.
Buuuuut, after some searching, I found and answer here I got it to work.
First, I installed the 32-bit version of MySQL, as opposed to the 64-bit version, but I'm not sure if that made a difference.
Then, uninstall the Mysql gem
gem uninstall mysql2
then reinstall it
sudo gem install mysql2
and finally
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
and you should be good to go! Worked for me anyways. good luck!
I had the same problem. I simply ran the following code:
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib
Press enter, and then run
rails server
and it worked!
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/
This is the code that worked for me :D