gpt4 book ai didi

mysql - 如何解决请安装mysql适配器: `gem install activerecord-mysql-adapter` (no such file to load -- java)

转载 作者:行者123 更新时间:2023-11-29 03:41:26 25 4
gpt4 key购买 nike

我找不到解决这个问题的方法。我收到错误:

rake db:migrate
(in /home/EXPRESS.LOCAL/shevchenko/web/tmp)
DEPRECATION WARNING: Rake tasks in vendor/plugins/paperclip/tasks and vendor/plugins/restful-authentication/tasks are deprecated. Use lib/tasks instead. (called from /home/EXPRESS.LOCAL/shevchenko/.rvm/gems/ruby-1.8.7-p371/gems/rails-2.3.8/lib/tasks/rails.rb:10)
rake aborted!
Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (no such file to load -- java)

我正在尝试卸载 rake 0.9.2.2 并安装 0.8.7,然后将 adapter:mysql 更改为 adapter:mysql2。

这是我的 gem :

bundle show
Gems included by the bundle:
* actionmailer (2.3.8)
* actionpack (2.3.8)
* activerecord (2.3.8)
* activerecord-jdbc-adapter (1.2.2.1)
* activerecord-jdbcmysql-adapter (1.2.2.1)
* activeresource (2.3.8)
* activesupport (2.3.8)
* bundler (1.2.1)
* jdbc-mysql (5.1.13)
* mysql2 (0.3.6)
* rack (1.1.3)
* rails (2.3.8)
* rake (0.8.7)

这是 gem 环境输出:

RubyGems Environment:
- RUBYGEMS VERSION: 1.4.2
- RUBY VERSION: 1.8.7 (2012-10-12 patchlevel 371) [i686-linux]
- INSTALLATION DIRECTORY: /home/EXPRESS.LOCAL/shevchenko/.rvm/gems/ruby-1.8.7-p371
- RUBY EXECUTABLE: /home/EXPRESS.LOCAL/shevchenko/.rvm/rubies/ruby-1.8.7-p371/bin/ruby
- EXECUTABLE DIRECTORY: /home/EXPRESS.LOCAL/shevchenko/.rvm/gems/ruby-1.8.7-p371/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /home/EXPRESS.LOCAL/shevchenko/.rvm/gems/ruby-1.8.7-p371
- /home/EXPRESS.LOCAL/shevchenko/.rvm/gems/ruby-1.8.7-p371@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/

最佳答案

也许这是因为 gem mysql2 的版本,编辑你的 Gemfile:

gem "mysql2", "0.2.6"

然后再次运行 bundle install 和 migrate。

关于mysql - 如何解决请安装mysql适配器: `gem install activerecord-mysql-adapter` (no such file to load -- java),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13360013/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com