Forum: Ruby on Rails minor issue with mysql/ruby - major headache

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.
E9858a1070ab57b8cf068e8f9d54bb4a?d=identicon&s=25 charl (Guest)
on 2006-04-07 08:51
i hope its minor,

i'm running lighty1.4x ruby 1.8x mysql 5.0.1x and i can see my rails app
on 127.0.0.1:3000 but if i try run a app with database connection
(scaffold) i get this error
NameError in Message#index

uninitialized constant Mysql

RAILS_ROOT: ./config/..
Application Trace | Framework Trace | Full Trace

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:195:in
`const_missing'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/mysql_adapter.rb:35:in
`mysql_connection'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in
`send'
if i run the same app with webrick it works. i have a feeling it is the
mysql_ruby GEM which i haven't got working in sync with ruby. I followed
the instruction on http://www.jjleonard.co.uk/?p=102 "copy mysql.rb to
the ruby install directory, typically c:\ruby\lib\ruby\1.8\" i
downloaded this version ruby-mysql-0.2.6.tar.gz. is there anything else
i need to do?

thanks for anyone who  can offer any advice
E9858a1070ab57b8cf068e8f9d54bb4a?d=identicon&s=25 charl (Guest)
on 2006-04-14 19:20
> uninitialized constant Mysql
>
RAILS_ROOT: ./config/..
Application Trace | Framework Trace | Full Trace

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:195:in
`const_missing'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/mysql_adapter.rb:35:in
`mysql_connection'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in
>`send'
>

someone else had a similar problem to me and he found this fix
http://www.ruby-forum.com/topic/8061#63856

it definately works now, strange one.
A0ed1bbfe42f4f87e6db0a16706246e2?d=identicon&s=25 mgreenly (Guest)
on 2006-04-14 23:58
charl wrote:
> i hope its minor,
>
> i'm running lighty1.4x ruby 1.8x mysql 5.0.1x and i can see my rails app
> on 127.0.0.1:3000 but if i try run a app with database connection
> (scaffold) i get this error
> NameError in Message#index
>
> uninitialized constant Mysql


I've ran into a situtation in Windows where the MySQL lib was not being
found when the path to the MySQL dlls was the last item in the systems
PATH variable and did not end with a semicolon.  The fix for me was
simply to add that semicolon.
This topic is locked and can not be replied to.