bosko/rmre — Issue #5: Incompatibility with ruby 1.9.2 and rails 3.1.1
Author: seren
Created: 2011-10-15 10:38:00+00:00
State: open

I'm not quite sure which aspect of my setup is causing the problems, but I'm can't see to get rmre to run with ruby-1.9.2 and rails 3.1.1 or 3.0.1. I'm running on OS X 10.6 with ruby 1.9.2-p290 and multiple versions of the mysql and mysql2 gems. I tried adding "gem 'mysql', '2.8.1'" and "gem 'mysql2'" to what I believe was the correct gem spec file. Here's my gem list and the two different errors I got when switching from rails 3.1.1 to 3.0.1. If you have any idea what is causing this, I'd love to hear it.

# gem list

*** LOCAL GEMS *** (editted for brevity)

activemodel (3.1.1, 3.0.10)
activerecord (3.1.1, 3.0.10)
activeresource (3.1.1, 3.0.10)
bundler (1.0.18, 1.0.15)
erubis (2.7.0, 2.6.6)
mysql (2.8.1)
mysql2 (0.3.7, 0.2.7)
rack (1.3.4, 1.2.3)
rails (3.0.10)
rake (0.9.2)
rmre (0.0.2)

# rmre -a mysql -d ec2 -u root -o /Users/railsuser/testrails/app/models/
/Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/mysql_adapter.rb:34:in `mysql_connection': undefined method `init' for Mysql:Class (NoMethodError)
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:304:in `new_connection'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:323:in `checkout_new_connection'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in `block (2 levels) in checkout'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:261:in `loop'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:261:in `block in checkout'
from /Users/railsuser/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:260:in `checkout'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:162:in `connection'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:409:in `retrieve_connection'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:107:in `retrieve_connection'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:89:in `connection'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/rmre-0.0.2/lib/rmre/generator.rb:23:in `connect'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/rmre-0.0.2/bin/rmre:57:in `'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/bin/rmre:19:in `load'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/bin/rmre:19:in `

'

# gem uninstall activerecord

Select gem to uninstall:
1. activerecord-3.0.10
2. activerecord-3.1.1
3. All versions
> 2
Successfully uninstalled activerecord-3.1.1

# rmre -a mysql -d ec2 -u root -o /Users/railsuser/testrails/app/models/
/Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.10/lib/active_record/connection_adapters/mysql_adapter.rb:26:in `mysql_connection': !!! Outdated mysql gem. Upgrade to 2.8.1 or later. In your Gemfile: gem 'mysql', '2.8.1'. Or use gem 'mysql2' (RuntimeError)
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:229:in `new_connection'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:237:in `checkout_new_connection'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:191:in `block (2 levels) in checkout'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:187:in `loop'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:187:in `block in checkout'
from /Users/railsuser/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:186:in `checkout'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:94:in `connection'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:317:in `retrieve_connection'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/connection_specification.rb:97:in `retrieve_connection'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/connection_specification.rb:89:in `connection'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/rmre-0.0.2/lib/rmre/generator.rb:23:in `connect'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/gems/rmre-0.0.2/bin/rmre:57:in `'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/bin/rmre:19:in `load'
from /Users/railsuser/.rvm/gems/ruby-1.9.2-p290/bin/rmre:19:in `

'