无法在Gemfile中列出的任何来源中找到

时间:2016-11-04 05:40:38

标签: ruby-on-rails ruby rubygems bundler

Your bundle is locked to faker (1.6.3), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of faker (1.6.3) has removed it. You'll need to update your bundle to a different version of faker (1.6.3) that hasn't been removed in order to install.
Run `bundle install` to install missing gems.

即使我安装1.6.31.6.51.6.6,我也会收到此错误。

gem listfaker (1.6.6, 1.6.3)

bundle env

gem install faker运行正常,并安装最新的1.6.6

运行rails 服务器控制台时出现此错误。

2 个答案:

答案 0 :(得分:1)

它有效!!!

bundle install --binstubs

bundle exec rails c

答案 1 :(得分:0)

确保在Gemfile

中添加了源代码
source 'https://rubygems.org'

gem 'faker', '~> 1.6.3'

然后运行

bundle update faker

这可以解决您的问题