On 8/19/06, Guillaume Carbonneau <[EMAIL PROTECTED]> wrote: > > > > On 8/18/06, Zed Shaw <[EMAIL PROTECTED]> wrote: > > On Fri, 2006-08-18 at 10:12 -0400, Guillaume Carbonneau wrote: > > > Hi, > > > > > > I'm pretty newb at Rails deployement stuff. > > > I'm setting up a Mongrel web server on windows following the tutorial > > > on the official site. > > > My app works except when there's interaction with MySQL. I get this > > > error : > > > > > > "Uninitialized constant Mysql" > > > > > > Now i'm pretty lost and i'm sure i'm doing something wrong. I've tried > > > searching google, ruby and rails mailing list but didn't find > > > anything. > > > I'd appreciate if you guys could point me to the right direction. Like > > > what steps I have to do to make mysql interact with Mongrel/Ruby. > > > > > > > Haven't seen this from people who use win32, so I'm thinking your setup is > wrong somehow. > > > > Have you tried installing the win32 mysql gem? > > > > gem install mysql > > > > I believe that'll intall it but you have to pick win32. If you've > > already done this then maybe remove it and see if you get the error. > > > > > > -- > > Zed A. Shaw > > http://www.zedshaw.com/ > > http://mongrel.rubyforge.org/ > > http://www.railsmachine.com/ -- Need Mongrel support? > > > > _______________________________________________ > > Mongrel-users mailing list > > [email protected] > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > I updated my gems > I tried removing / reinstalling the mysql gem and i'm still getting the > error. > I always pick the mswin32 btw... > > I noticed a pattern when I start the mongrel server.. > 1st request generates this error : uninitialized constant Mysql > 2nd and further errors : uninitialized constant ActiveRecord::Mysql > Still getting errors. I tried with dead simple apps and it generates the > same errors > > Thanks for your answers so far... > > Guillaume Carbonneau
1. in c:\ruby\lib\gems\gems\activerecord-x.x.x\lib\activerecord\connection_adapters\ (or similar) you should have mysql_adapter.rb. try a little test: just create instance of it, even without any configuration: require 'activerecord/adapters/mysql_adapter' ActiveRecord::ConnectionAdapters::MysqlAdapter.new() to see if it complains about the constant. 2. in c:\ruby\lib\gems\gems\activerecord-x.x.x\lib\activerecord\vendor\ you should have file mysql.rb - the pure rb mysql driver that is used if the binary one is not used. 3. change your ruby association temporarily to "c:\ruby\bin\ruby.exe" -dw "%1" %* to see all the exceptions and warnings. J. _______________________________________________ Mongrel-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/mongrel-users
