Install mysql2 gem on Snow Leopard for Rails 3 with rvm

后端 未结 2 1729
执念已碎
执念已碎 2020-12-13 18:45

I have recently upgraded to Rails 3 and created a new application with Rails 3.0.3, but I keep getting an error

Macintosh:$ rails server
=> Booting WEBrick
=> Rai         


        
2条回答
  •  感情败类
    2020-12-13 19:25

    If you're seeing this recently, it's because mysql2 0.3 removed the ActiveRecord Adapter, which is now part of Rails 3.1

    WARNING: This version of mysql2 (0.3.2) doesn't ship with the ActiveRecord adapter bundled anymore as it's now part of Rails 3.1
    WARNING: Please use the 0.2.x releases if you plan on using it in Rails <= 3.0.x
    

    Adjust your Gemfile accordingly if you're on Rails 3.0.x

    gem 'mysql2', '~> 0.2.6'
    

提交回复
热议问题