views:

414

answers:

3

For the last several days, I've been struggling to get ruby on rails to work on my mac. The main culprit is MySQL. Every time I fix one thing, another error shows up. I upgraded/downgraded MySQL to play nice with ruby, rail and gems, but nothing. My latest error is:

!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.

/!\ FAILSAFE /!\ Wed Aug 05 21:09:23 -0700 2009 Status: 500 Internal Server Error dlopen(/usr/local/lib/ruby/site_ruby/1.8/i686-darwin9.7.0/mysql.bundle, 9): Library not loaded: /usr/local/mysql/lib/libmysqlclient.16.dylib...

I don't have libmysqlclient.16.dylib; just *.15.dylib. Tried all the techniques, even installed or tried to install ruby-mysql-0.2.6 posted at tmtm.org

FYI: Last error prior to the one stated above had to do with authentication.

Appreciate any help.

A: 

Have you installed Xcode Developer tools? You can download it for free at http://developer.apple.com/.

Whenever I have issues with Ruby and MySQL, I never had Xcode installed. Could be wrong.

Garrett
Yes. Everything is in place, or at least they should be. Every single error I get, has to with mysql. I know rails is working, because when I run "rails test_directory", it creates all the proper files and directories, and so on. Thanks for your input.
monocat
You don't need MySQL for the rails command to work, but good job solving your own question.
Garrett
A: 

Answering my own question.

I don't know why and I don't know how, but took @Garrett's advice and re-installed Xcode. That didn't do anything. Went ahead and upgraded MySQL after that, which I had done before, and voilá! it worked. I'm guessing both re-installations finally got it working somehow. Weird!

monocat
A: 

Try using the below command . Provide the location of the mysql directory in your Mac .

sudo gem install mysql -- --with-mysql-dir= /usr/local/mysql

It looks like you haven't specified the location of mysql directory .

Good luck !

YetAnotherCoder