= 0) ruby' in the gems available on this machine-6ren"> = 0) ruby' in the gems available on this machine-我做了 gem mysql2。这就是我的 GemFile 的样子: source 'https://rubygems.org' gem 'rails', '3.2.3' # Bundle edge R-6ren">
gpt4 book ai didi

ruby - 导轨错误 : "Could not find gem ' activerecord-mysql2-adapter (>= 0) ruby' in the gems available on this machine

转载 作者:太空宇宙 更新时间:2023-11-03 16:55:41 25 4
gpt4 key购买 nike

我做了 gem mysql2。这就是我的 GemFile 的样子:

source 'https://rubygems.org'

gem 'rails', '3.2.3'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'


# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'mysql2'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', :platform => :ruby
gem 'activerecord-mysql2-adapter'
gem 'uglifier', '>= 1.0.3'

end

gem 'jquery-rails'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'

这是我的配置文件:

development:
adapter: mysql2
encoding: utf8
database: qac_db
pool: 5
username: root
password:
socket: /tmp/mysql.sock

我哪里错了?

最佳答案

删除行 gem 'activerecord-mysql2-adapter'。然后运行 ​​bundle install

关于ruby - 导轨错误 : "Could not find gem ' activerecord-mysql2-adapter (>= 0) ruby' in the gems available on this machine,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10375822/

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