liu-shaobo 发表于 2012-11-19 19:22

can't activate mysql

本帖最后由 liu-shaobo 于 2012-11-19 19:24 编辑

请教各位 gem 问题

Please install the mysql adapter: `gem install activerecord-mysql-adapter` (can't activate mysql (~> 2.8.1, runtime), already activated mysql-2.9.0. Make sure all dependencies are added to Gemfile.)
/www/redmine-2.1.2/lib/plugins/acts_as_activity_provider/init.rb:2
/www/redmine-2.1.2/config/initializers/00-core_plugins.rb:12
/www/redmine-2.1.2/config/initializers/00-core_plugins.rb:2:in `each'
/www/redmine-2.1.2/config/initializers/00-core_plugins.rb:2
/www/redmine-2.1.2/config/environment.rb:14
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

已经安装的gem 模块
actionmailer (3.2.8)
actionpack (3.2.8)
activemodel (3.2.8)
activerecord (3.2.8)
activeresource (3.2.8)
activesupport (3.2.8)
arel (3.0.2)
builder (3.0.0)
bundler (1.2.2)
coderay (1.0.8)
erubis (2.7.0)
fastercsv (1.5.5)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (2.0.3)
json (1.7.5)
mail (2.4.4)
mime-types (1.19)
multi_json (1.3.7)
mysql (2.9.0)
net-ldap (0.3.1)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-openid (1.3.1)
rack-ssl (1.3.2)
rack-test (0.6.2)
rails (3.2.8)
railties (3.2.8)
rake (10.0.1)
rdoc (3.12)
rmagick (2.13.1)
ruby-openid (2.1.8)
sprockets (2.1.3)
thor (0.16.0)
tilt (1.3.3)
treetop (1.4.12)
tzinfo (0.3.35)


我卸载2.9.0 后
gem install -v=2.8.1 mysql
gem uninstall -v=2.9.0

执行又出现这个错误,晕了
# rake db:migrate RAILS_ENV=production
Could not find mysql-2.9.0 in any of the sources
Run `bundle install` to install missing gems.

liu-shaobo 发表于 2012-11-19 19:49

修改Gemfile 的如下行就可以了,:-L

   gem "mysql", "2.8.1"
页: [1]
查看完整版本: can't activate mysql