I''ve updated my rails environment and am trying to connect to the application via fastcgi and get the following error showing up in the fastcgi.crash.log. Anyone have an idea how to solve this? Thanks - Boris [24/Jul/2005:18:33:44 :: 16476] Dispatcher failed to catch: uninitialized constant Mysql (NameError) C:/Programs/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_suppo rt/dependencies.rb:186:in `const_missing'' C:/Programs/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_recor d/connection_adapters/mysql_adapter.rb:37:in `mysql_connection'' C:/Programs/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_recor d/query_cache.rb:52:in `send'' C:/Programs/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_recor d/query_cache.rb:52:in `connection='' C:/Programs/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_recor d/connection_adapters/abstract_adapter.rb:108:in `retrieve_connection'' C:/Programs/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_recor d/base.rb:239:in `connection'' C:/Programs/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_recor d/base.rb:622:in `columns'' C:/Programs/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_recor d/base.rb:627:in `columns_hash'' C:/Programs/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controll er/session/active_record_store.rb:71:in `setup_sessid_compatibility!'' C:/Programs/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controll er/session/active_record_store.rb:44:in `find_by_session_id'' C:/Programs/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controll er/session/active_record_store.rb:243:in `initialize'' C:/Programs/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controll er/session/active_record_store.rb:243:in `silence'' C:/Programs/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controll er/session/active_record_store.rb:243:in `initialize'' C:/Programs/ruby/lib/ruby/1.8/cgi/session.rb:273:in `new'' C:/Programs/ruby/lib/ruby/1.8/cgi/session.rb:273:in `initialize'' C:/Programs/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controll er/cgi_process.rb:94:in `new'' C:/Programs/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controll er/cgi_process.rb:94:in `session'' C:/Programs/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controll er/base.rb:737:in `assign_shortcuts'' C:/Programs/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controll er/base.rb:351:in `process'' C:/Programs/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controll er/rescue.rb:20:in `process_with_exception'' C:/Programs/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/dispatcher.rb:34:in `dispatch'' C:/Programs/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/fcgi_handler.rb:144 :in `process_request'' C:/Programs/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/fcgi_handler.rb:64: in `process!'' C:/Programs/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/fcgi_handler.rb:55: in `each_cgi'' C:/Programs/ruby/lib/ruby/site_ruby/1.8/fcgi.rb:595:in `each'' C:/Programs/ruby/lib/ruby/site_ruby/1.8/fcgi.rb:595:in `each_cgi'' C:/Programs/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/fcgi_handler.rb:55: in `process!'' C:/Programs/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/fcgi_handler.rb:21: in `process!'' D:/Projects/bitslapped/webroot/public/dispatch.fcgi:25 _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I may be having the same problem. I''m trying to deploy a rails app on a Windows 2k server running IIS. I installed the one-click Ruby installer for Windows, and did a gem install rails. I then setup everything with FCGI and I was able to get a bare bones "hello world" rails app running fine. Now, when I try to run my main rails application it gives this error: uninitialized constant Mysql What could that mean? The mySQL server is located on another machine, and I can connect to it fine using PHP, etc. Any ideas on what I should do? Is there something I forgot to install or configure? Thanks in advance. :-) PS: I did all the development for this app on OS X (with no problems whatsoever) and the app works fine -Cody On Jul 24, 2005, at 11:39 AM, Boris wrote:> I''ve updated my rails environment and am trying to connect to the > application via fastcgi and get the following error showing up in > the fastcgi.crash.log. Anyone have an idea how to solve this? > > Thanks - Boris > > [24/Jul/2005:18:33:44 :: 16476] Dispatcher failed to catch: > uninitialized constant Mysql (NameError) > C:/Programs/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/ > active_support/dependencies.rb:186:in `const_missing'' > C:/Programs/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/ > active_record/connection_adapters/mysql_adapter.rb:37:in > `mysql_connection'' > > C:/Programs/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/ > active_record/query_cache.rb:52:in `send'' > C:/Programs/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/ > active_record/query_cache.rb:52:in `connection='' > C:/Programs/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/ > active_record/connection_adapters/abstract_adapter.rb:108:in > `retrieve_connection'' > > C:/Programs/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/ > active_record/base.rb:239:in `connection'' > C:/Programs/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/ > active_record/base.rb:622:in `columns'' > C:/Programs/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/ > active_record/base.rb:627:in `columns_hash'' > C:/Programs/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/ > action_controller/session/active_record_store.rb:71:in > `setup_sessid_compatibility!'' > > C:/Programs/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/ > action_controller/session/active_record_store.rb:44:in > `find_by_session_id'' > > C:/Programs/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/ > action_controller/session/active_record_store.rb:243:in `initialize'' > > C:/Programs/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/ > action_controller/session/active_record_store.rb:243:in `silence'' > > C:/Programs/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/ > action_controller/session/active_record_store.rb:243:in `initialize'' > > C:/Programs/ruby/lib/ruby/1.8/cgi/session.rb:273:in `new'' > C:/Programs/ruby/lib/ruby/1.8/cgi/session.rb:273:in `initialize'' > C:/Programs/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/ > action_controller/cgi_process.rb:94:in `new'' > C:/Programs/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/ > action_controller/cgi_process.rb:94:in `session'' > C:/Programs/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/ > action_controller/base.rb:737:in `assign_shortcuts'' > C:/Programs/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/ > action_controller/base.rb:351:in `process'' > C:/Programs/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/ > action_controller/rescue.rb:20:in `process_with_exception'' > > C:/Programs/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/ > dispatcher.rb:34:in `dispatch'' > C:/Programs/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/ > fcgi_handler.rb:144:in `process_request'' > C:/Programs/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/ > fcgi_handler.rb:64:in `process!'' > C:/Programs/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/ > fcgi_handler.rb:55:in `each_cgi'' > C:/Programs/ruby/lib/ruby/site_ruby/1.8/fcgi.rb:595:in `each'' > C:/Programs/ruby/lib/ruby/site_ruby/1.8/fcgi.rb:595:in `each_cgi'' > C:/Programs/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/ > fcgi_handler.rb:55:in `process!'' > C:/Programs/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/ > fcgi_handler.rb:21:in `process!'' > D:/Projects/bitslapped/webroot/public/dispatch.fcgi:25 > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
On Jul 25, 2005, at 3:09 AM, Cody wrote:> I may be having the same problem. I''m trying to deploy a rails app > on a Windows 2k server running IIS. I installed the one-click Ruby > installer for Windows, and did a gem install rails. I then setup > everything with FCGI and I was able to get a bare bones "hello > world" rails app running fine. Now, when I try to run my main rails > application it gives this error: > > uninitialized constant Mysql > > What could that mean? The mySQL server is located on another > machine, and I can connect to it fine using PHP, etc. Any ideas on > what I should do? Is there something I forgot to install or > configure? Thanks in advance. :-) >Sounds like it''s not picking up the mysql library. There''s a ruby lib included with the Rails install, but I''ve heard several people recommend the native C mysql bindings. Have you tried "gem install mysql"? Duane Johnson (canadaduane)
I tried doing a "gem install mysql" but that doesn''t work on Windows. How can I verify it is using the mysql library with native c bindings? I thought this was included with the one-click installer? -Cody On Jul 25, 2005, at 10:38 AM, Duane Johnson wrote:> > On Jul 25, 2005, at 3:09 AM, Cody wrote: > > >> I may be having the same problem. I''m trying to deploy a rails app >> on a Windows 2k server running IIS. I installed the one-click Ruby >> installer for Windows, and did a gem install rails. I then setup >> everything with FCGI and I was able to get a bare bones "hello >> world" rails app running fine. Now, when I try to run my main >> rails application it gives this error: >> >> uninitialized constant Mysql >> >> What could that mean? The mySQL server is located on another >> machine, and I can connect to it fine using PHP, etc. Any ideas on >> what I should do? Is there something I forgot to install or >> configure? Thanks in advance. :-) >> >> > > Sounds like it''s not picking up the mysql library. There''s a ruby > lib included with the Rails install, but I''ve heard several people > recommend the native C mysql bindings. Have you tried "gem install > mysql"? > > Duane Johnson > (canadaduane) > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Ok, just an update. People in IRC told me that I have to have mySQL installed on the machine, even if the mySQL server I will connect to is located on a different machine. So I installed mySQL on the web server, but didn''t start it up or anything. But, I still can''t build the gem, and I don''t even know if you''re supposed to be able to build the gem on Windows. I still continue to get the "uninitialized constant Mysql" error when running my rails app. Is anyone here running rails on Windows? Did you need to install the mysql gem? Any tips on what need to be done to connect to a mySQL server which runs on a different machine? This is driving me nuts, if I get this solved everything else is good to go. -Cody On Jul 25, 2005, at 12:51 PM, Cody wrote:> I tried doing a "gem install mysql" but that doesn''t work on > Windows. How can I verify it is using the mysql library with native > c bindings? I thought this was included with the one-click installer? > > -Cody > > On Jul 25, 2005, at 10:38 AM, Duane Johnson wrote: > > >> >> On Jul 25, 2005, at 3:09 AM, Cody wrote: >> >> >> >>> I may be having the same problem. I''m trying to deploy a rails >>> app on a Windows 2k server running IIS. I installed the one-click >>> Ruby installer for Windows, and did a gem install rails. I then >>> setup everything with FCGI and I was able to get a bare bones >>> "hello world" rails app running fine. Now, when I try to run my >>> main rails application it gives this error: >>> >>> uninitialized constant Mysql >>> >>> What could that mean? The mySQL server is located on another >>> machine, and I can connect to it fine using PHP, etc. Any ideas >>> on what I should do? Is there something I forgot to install or >>> configure? Thanks in advance. :-) >>> >>> >>> >> >> Sounds like it''s not picking up the mysql library. There''s a ruby >> lib included with the Rails install, but I''ve heard several people >> recommend the native C mysql bindings. Have you tried "gem >> install mysql"? >> >> Duane Johnson >> (canadaduane) >> >> >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> >> > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Just nailed it by downloading a different mysql.so right here: http://seagecko.org/thoughts/in-the-past/2004/09/09/ruby-mysql-and-windows/ Let me know how you progress. Boris -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Cody Sent: maandag 25 juli 2005 21:19 To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails] Fcgi error Ok, just an update. People in IRC told me that I have to have mySQL installed on the machine, even if the mySQL server I will connect to is located on a different machine. So I installed mySQL on the web server, but didn''t start it up or anything. But, I still can''t build the gem, and I don''t even know if you''re supposed to be able to build the gem on Windows. I still continue to get the "uninitialized constant Mysql" error when running my rails app. Is anyone here running rails on Windows? Did you need to install the mysql gem? Any tips on what need to be done to connect to a mySQL server which runs on a different machine? This is driving me nuts, if I get this solved everything else is good to go. -Cody On Jul 25, 2005, at 12:51 PM, Cody wrote:> I tried doing a "gem install mysql" but that doesn''t work on > Windows. How can I verify it is using the mysql library with native > c bindings? I thought this was included with the one-click installer? > > -Cody > > On Jul 25, 2005, at 10:38 AM, Duane Johnson wrote: > > >> >> On Jul 25, 2005, at 3:09 AM, Cody wrote: >> >> >> >>> I may be having the same problem. I''m trying to deploy a rails >>> app on a Windows 2k server running IIS. I installed the one-click >>> Ruby installer for Windows, and did a gem install rails. I then >>> setup everything with FCGI and I was able to get a bare bones >>> "hello world" rails app running fine. Now, when I try to run my >>> main rails application it gives this error: >>> >>> uninitialized constant Mysql >>> >>> What could that mean? The mySQL server is located on another >>> machine, and I can connect to it fine using PHP, etc. Any ideas >>> on what I should do? Is there something I forgot to install or >>> configure? Thanks in advance. :-) >>> >>> >>> >> >> Sounds like it''s not picking up the mysql library. There''s a ruby >> lib included with the Rails install, but I''ve heard several people >> recommend the native C mysql bindings. Have you tried "gem >> install mysql"? >> >> Duane Johnson >> (canadaduane) >> >> >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> >> > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails