Forum: Ruby on Rails Mac OS X and Uninitialzed Constant Mysql

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
4d37538c2cb2cf3edea6312b2f442fce?d=identicon&s=25 Jeremy Torres (Guest)
on 2006-05-14 23:21
(Received via mailing list)
Development Platform:
ruby 1.8.4
Rails 1.1.2
mysql "gem" 2.7
Mac OS X (10.4.6), 64-bit
Mysql 5.0.19-standard (64-bit)
Lighttpd, 1.4.11

I'm trying to startup a simple test rails app against mysql.  Rails
starts up fine and my pages render successfully, until a DB access is
made.  I'm getting a "uninitialized constant Mysql".  I've searched,
but can't find an answer.  Thanks.
F5c118aaeb5bb7162db613a37e595be8?d=identicon&s=25 Mick Sharpe (micksharpe)
on 2006-05-14 23:32
"uninitialized constant xxx" errors usually indicate that Ruby cannot
find a definition for class xxx. Have you configured your databases
correctly in config/database.yml ?
11d9d2be0afe0a3bfcf2347325dc9f12?d=identicon&s=25 Jim Halberg (Guest)
on 2006-05-15 16:24
(Received via mailing list)
Try adding this to the top of your rb file:

require 'mysql'

On 5/14/06, Mick Sharpe <mick.sharpe@btinternet.com> wrote:
> "uninitialized constant xxx" errors usually indicate that Ruby cannot
> find a definition for class xxx. Have you configured your databases
> correctly in config/database.yml ?
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
0bcc972918891ef358b0b3dfb4e7f18b?d=identicon&s=25 Hammed Malik (Guest)
on 2006-05-15 22:36
(Received via mailing list)
Sounds like the mysql driver isn't installed.

take a look at /config/database.yml :

# On MacOS X:
#   gem install mysql -- --include=/usr/local/lib

I used Todd Huss's intel binary package for my macbook:

http://gabrito.com/post/ruby-on-rails-mac-osx-intel-binary (currently
down)
This topic is locked and can not be replied to.