** PLEASE HELP A NEWBIE ** Status: 500 Internal Server Error no such file to load -- mysql

Hello All,

I have managed to upgrade ruby to 1.8.7.

However, when I use Terminal and 'cd' to the app and run 'ruby script/
server' ... I get an error when i click the link 'about your
applications environment'.

When I look into Terminal, it suggests Status: 500 Internal Server
Error
  no such file to load -- mysql

How do I overcome this? I have cd'd into the app and then run gem
list. this lists:
*** LOCAL GEMS ***

actionmailer (2.3.3)
actionpack (2.3.3)
activerecord (2.3.3)
activeresource (2.3.3)
activesupport (2.3.3)
rack (1.0.0)
rails (2.3.3)
rake (0.8.7)
rubygems-update (1.3.5)
sqlite3-ruby (1.2.5)

No Mysql gem, and not sure why. Am I mean to install it at the app
level, or in another directory?

I've also noticed that I have this in the terminal after i've clicked
the link in

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

However - rails -v returns version Rails 2.3.3

I'm confused now... Can anyone help??

Cheers

Thankyou for replying.

i ran sudo gem install mysql and i got the following error:

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

/usr/local/bin/ruby extconf.rb
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

i'm not experienced enough to fully understand this error, or how /
what to edit in the file it refers to..

many thanks

what distribution are you using?

i'm running darwin 9.7

Craig,

Check where the file "mysql_config " is on you system.You can use
locate command to find.

Then you can pass --with-mysql-config=PATH_mysql_config file while
installing

Kilari.

i ran into a similar looking error when installing the slqite gem and
i found that the problem was that a didn't have the header files for
sqlite installed.

** i ran into a similar looking error when installing the slqite gem
and
i found that the problem was that a didn't have the header files for
sqlite installed. **

- -- - - -- how did you resolve this?

Hi Craig,
This should help you get things set up the right way. You will need
your OS X installation DVD to install the Xcode tools, but this works
like a charm:

http://robots.thoughtbot.com/post/159805668/2009-rubyists-guide-to-a-mac-os-x-development
(*scroll down to the Xcode and MySQL sections)

HTH!

Thanks for all the posts,

I'll give this a shot and see how I get on!