我将 rbenv 与 Ruby 1.9.2-p290、Rails 3.1 一起使用,数据库是 MySQL。
当我尝试
rake db:create
我收到以下错误:
Could not find multi_json-1.0.3 in any of the sources
我也尝试过 bundle exec rake db:create
。
我的 GemFile 看起来像这样:
source 'http://rubygems.org'
gem 'rails', '3.1.0'
gem 'mysql2'
gem 'json'
group :assets do
gem 'sass-rails', " ~> 3.1.0"
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end
gem 'jquery-rails'
最佳答案
相当古老,但以防万一其他人遇到这个问题并正在寻找真正的答案:升级您的 bundler gem。
关于ruby - 运行 rake 时缺少 gem ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7381407/