rtacconi
2011-Mar-25 12:10 UTC
undefined method `init'' for Mysql:Class on Mac with rvm and Passenger 3
I tried to find some help in the Passenger group without luck. I would not like to use mysql2 gem (it gives an error too) because in production I have to use mysql gem anyway. I moved to Passenger 3 and I am not able to run a Rails 2 and a 3 apps. They both uses Passenger 3 (latest) and ree 2011.03. The Rails 2 app gives uninitialized constant MysqlCompat::MysqlRes The Rails 3: NoMethodError undefined method `init'' for Mysql:Class Rails.root: /opt/local/apache2/rails-data/apps Application Trace | Framework Trace | Full Trace activerecord (3.0.5) lib/active_record/connection_adapters/ mysql_adapter.rb:30:in `mysql_connection'' activerecord (3.0.5) lib/active_record/connection_adapters/abstract/ connection_pool.rb:229:in `send'' activerecord (3.0.5) lib/active_record/connection_adapters/abstract/ connection_pool.rb:229:in `new_connection'' -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2011-Mar-25 14:16 UTC
Re: undefined method `init'' for Mysql:Class on Mac with rvm and Passenger 3
On Mar 25, 12:10 pm, rtacconi <rtacc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I tried to find some help in the Passenger group without luck. I would > not like to use mysql2 gem (it gives an error too) because in > production I have to use mysql gem anyway. I moved to Passenger 3 and > I am not able to run a Rails 2 and a 3 apps. They both uses Passenger > 3 (latest) and ree 2011.03. >When i''ve read about this sort of error before, it usually boils down to the fact that the native extension in the library didn''t load. In particular, make sure that it''s compiled for the right architecture (eg if you only have a 32bit mysql then you''ll probably end up with a 32bit mysql gem extension, which a 64bit passenger instance can''t use). lipo -detailed_info /path/to/file will tell you the architectures supported by an executable / library Fred> The Rails 2 app gives uninitialized constant MysqlCompat::MysqlRes > > The Rails 3: > > NoMethodError > > undefined method `init'' for Mysql:Class > > Rails.root: /opt/local/apache2/rails-data/apps > Application Trace | Framework Trace | Full Trace > > activerecord (3.0.5) lib/active_record/connection_adapters/ > mysql_adapter.rb:30:in `mysql_connection'' > activerecord (3.0.5) lib/active_record/connection_adapters/abstract/ > connection_pool.rb:229:in `send'' > activerecord (3.0.5) lib/active_record/connection_adapters/abstract/ > connection_pool.rb:229:in `new_connection''-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.