简体   繁体   中英

Bundler::GemNotFound: Could not find erubi-1.7.0 in any of the sources

Hello i have a problem with bundle.

I am actually developing a rails app in a docker (dockerized rails)

I need to add the bcrypt gem, but when i add this gem and run bundle install ans bundle update i got this error message :

Thanks for help

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'

Here is my 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]

And my bundle env

Environment

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 Build Metadata

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

Seems to be a typo. Pretty sure you need gem 'erubis', '~> 1.7' . I can't find reference to a gem called erubi anywhere, so bundler probably can't either.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM