Hi. Whenever I use activerecord I get this error NameError:
uninitialized constant Mysql. I installed the mysql 2.7 gem and I''m on
Rails 1.1.6 / Ruby 1.8.4. The gem was built successfully using ''gem
install -- --with-mysql-config=/usr/local/mysql/bin/mysql_config''.
Here''s a sample trace of the error in
''script/console'':
>> User.find 1
NameError: uninitialized constant Mysql
from
/usr/local/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in
`const_missing''
from
/usr/local/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in
`const_missing''
from
/usr/local/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/mysql_adapter.rb:34:in
`mysql_connection''
from
/usr/local/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:251:in
`connection_without_query_cache=''
from
/usr/local/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/query_cache.rb:54:in
`connection=''
from
/usr/local/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:220:in
`retrieve_connection''
from
/usr/local/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in
`connection''
from
/usr/local/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:764:in
`sanitize''
from
/usr/local/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:950:in
`find_one''
from
/usr/local/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:941:in
`find_from_ids''
from
/usr/local/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:382:in
`find''
from (irb):3>>
This is on Centos 4.3, and I''ve tried rebooting just as some posts
suggested.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---