Bundler :: GemNotFound:在任何来源中都找不到erubi-1.7.0

时间:2017-10-13 12:08:57

标签: ruby-on-rails rubygems docker-compose bcrypt-ruby erubis

您好我有捆绑问题。

我实际上是在docker(dockerized rails)中开发rails应用程序

我需要添加bcrypt gem,但是当我添加这个gem并运行bundle install ans bundle update时,我收到了以下错误消息:

感谢您的帮助

web_1  | bundler: failed to load command: rails (/usr/local/bundle/bin/rails)
web_1  | Bundler::GemNotFound: Could not find erubi-1.7.0 in any of the sources
web_1  |   /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/spec_set.rb:87:in `block in materialize'
web_1  |   /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/spec_set.rb:81:in `map!'
web_1  |   /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/spec_set.rb:81:in `materialize'
web_1  |   /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/definition.rb:159:in `specs'
web_1  |   /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/definition.rb:218:in `specs_for'
web_1  |   /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/definition.rb:207:in `requested_specs'
web_1  |   /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/runtime.rb:109:in `block in definition_method'
web_1  |   /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/runtime.rb:21:in `setup'
web_1  |   /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler.rb:101:in `setup'
web_1  |   /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/setup.rb:19:in `<top (required)>'
web_1  |   /usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
web_1  |   /usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'

这是我的Gemfile:

source 'https://rubygems.org'

git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
  "https://github.com/#{repo_name}.git"
end


gem 'rails', '~> 5.1.4'
gem 'puma', '~> 3.7'
gem 'sass-rails', '~> 5.0'
#gem 'coffee-rails', '~> 4.2'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'bcrypt', '~> 3.1', '>= 3.1.11'
gem 'erubi', '~> 1.7'

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
  # Adds support for Capybara system testing and selenium driver
  gem 'capybara', '~> 2.13'
  gem 'selenium-webdriver'
end

group :development do
  # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
  gem 'web-console', '>= 3.3.0'
  gem 'listen', '>= 3.0.5', '< 3.2'
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'
end

group :production do
  gem 'pg', '~> 0.18'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

我的捆绑环境

环境

Bundler 1.16.0.pre.3 Platforms ruby, x86_64-linux Ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux] Full Path /usr/bin/ruby Config Dir /etc RubyGems 2.6.13 Gem Home /usr/lib/ruby/gems/2.4.0 Gem Path /home/ervin/.gem/ruby/2.4.0:/usr/lib/ruby/gems/2.4.0 User Path /home/ervin/.gem/ruby/2.4.0 Bin Dir /usr/bin Tools
Git 2.14.1 RVM not installed rbenv not installed chruby not installed

Bundler构建元数据

Built At 2017-10-05 Git SHA d94616dd8 Released Version true

1 个答案:

答案 0 :(得分:0)

似乎是一个错字。很确定你需要gem 'erubis', '~> 1.7'。我无法在任何地方找到一个名为erubi的gem的引用,因此bundler可能也不能。