启动Rails服务器时出现此错误: 我已经尝试了gem install,gem更新,bundle更新,bundle安装。
Your bundle is locked to ffi (1.11.0), 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 ffi
(1.11.0) has removed it. You'll need to update your bundle to a version other than ffi (1.11.0) that hasn't been removed in order to install.
你能帮忙吗?谢谢!
source 'https://rubygems.org'
ruby '2.5.3'
gem 'bootsnap', require: false
gem 'jbuilder', '~> 2.0'
gem 'pg', '~> 0.21'
gem 'puma'
gem 'shopify_app'
gem 'rails', '5.2.3'
gem 'redis'
gem 'devise'
gem 'autoprefixer-rails'
gem 'font-awesome-sass', '~> 5.6.1'
gem 'sassc-rails'
gem 'simple_form'
gem 'uglifier'
gem 'webpacker'
group :development do
gem 'web-console', '>= 3.3.0'
end
group :development, :test do
gem 'pry-byebug'
gem 'pry-rails'
gem 'listen', '~> 3.0.5'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem 'dotenv-rails'
end
这是我的rake文件:
require_relative 'config/application'
Rails.application.load_tasks
答案 0 :(得分:3)
您遇到的问题是捆绑程序找不到该版本的ffi
。您最有可能最初在创建项目或添加gem时安装了它。 ffi
版本1.11.0
was pulled from RubyGems。
在项目上运行bundle update
,以获取最新版本,即今天的1.11.1
。这应该可以解决您的问题,因为当您下次在heroku运行bundler时进行部署时,它将从RubyGems中获取该版本。
答案 1 :(得分:2)
我遇到了同样的问题,bundle update ffi
为我修复了该问题。
答案 2 :(得分:1)
我正在按照CocoaPods dev environment setup的步骤进行操作,当我做rake bootstrap
时,出现以下错误:
Your bundle is locked to codecov (0.1.14), 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 codecov (0.1.14) has removed it. You'll need to update your bundle to a version other than codecov (0.1.14) that hasn't been removed in order
to install.
rake aborted!
Command failed with status (7): [bundle install...]
/Users/honey/Rainforest/Cork/Rakefile:9:in `block in <top (required)>'
在我的Rainforest
目录中,我尝试做bundle update codecov
,但得到了:
找不到Gemfile
如果您发现我的Rainforest目录(即/Rainforest/Cork
的子目录中出现错误,则失败。
因此,我只是将目录更改为/Users/honey/Rainforest/Cork
,其中有一个 Gemfile ,然后运行了bundle update codecov
。然后,我可以从我的rake bootstrap
目录运行Rainforest
答案 3 :(得分:1)
尝试以对话模式更新您的依赖项:
bundle update --conservative ffi
答案 4 :(得分:0)
删除Gemfile.lock中提到的捆绑器版本