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.
on 2006-05-15 01:21
on 2006-05-15 01: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 ?
on 2006-05-15 18:24
Try adding this to the top of your rb file: require 'mysql' On 5/14/06, Mick S. <firstname.lastname@example.org> 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 > email@example.com > http://lists.rubyonrails.org/mailman/listinfo/rails >
on 2006-05-16 00:36
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)