简体   繁体   中英

How to solve “Could not find i18n-0.6.5 in any of the sources (Bundler::GemNotFound)” AWS deploy

I am trying to deploy my application using AWS Elastic Beanstalk, but i get this error:

It looks like Bundler could not find a gem. This is probably because your
application is being run under a different environment than it's supposed to.
Please check the following:

* Is this app supposed to be run as the `webapp` user?
* Is this app being run on the correct Ruby interpreter? Below you will
see which Ruby interpreter Phusion Passenger attempted to use. If you 
are using RVM, please also check whether the correct gemset is being used.
 -------- The exception is as follows: -------
Could not find i18n-0.6.5 in any of the sources (Bundler::GemNotFound)
/usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/spec_set.rb:92:in `block in materialize'
/usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `map!'
/usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `materialize'
/usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in `specs'
/usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:159:in `specs_for'
/usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:148:in `requested_specs'
/usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/environment.rb:18:in `requested_specs'
/usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:13:in `setup'
/usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
/usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in `<top (required)>'
/usr/share/rubygems1.9/rubygems/custom_require.rb:60:in `require'
/usr/share/rubygems1.9/rubygems/custom_require.rb:60:in `rescue in require'
/usr/share/rubygems1.9/rubygems/custom_require.rb:35:in `require'
/usr/share/ruby/1.9/gems/1.9.1/gems/passenger-4.0.20/lib/phusion_passenger/loader_shared_helpers.rb:219:in `block in run_load_path_setup_code'
/usr/share/ruby/1.9/gems/1.9.1/gems/passenger-4.0.20/lib/phusion_passenger/loader_shared_helpers.rb:333:in `running_bundler'
/usr/share/ruby/1.9/gems/1.9.1/gems/passenger-4.0.20/lib/phusion_passenger/loader_shared_helpers.rb:217:in `run_load_path_setup_code'
/usr/share/ruby/1.9/gems/1.9.1/gems/passenger-4.0.20/helper-scripts/rack-preloader.rb:96:in `preload_app'
/usr/share/ruby/1.9/gems/1.9.1/gems/passenger-4.0.20/helper-scripts/rack-preloader.rb:150:in `<module:App>'
/usr/share/ruby/1.9/gems/1.9.1/gems/passenger-4.0.20/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/usr/share/ruby/1.9/gems/1.9.1/gems/passenger-4.0.20/helper-scripts/rack-preloader.rb:28:in `<main>'

I've tried bundle install --path vendor/cache , bundle package and committed Gemfile and Gemfile.lock .

Any help would be appreciated.

The problem was solved using the following:

 bundle pack
 bundle install --path vendor/cache

I got the answer from this : Installing Gems with Bundler == Big problem

Hope it helps someone with the same issue.

have you tried

bundle update i18n

verify the version in Gemfile.lock

cat Gemfile.lock | grep i18n

commit the Gemfile.lock and redeploy

It probably is caused as you are now using a different (higher) version of ruby than what the earlier app was built for. downgrade to lower version preferably using rvm, if you are using rvm.

hope that helps.

On windows you need to shut down all servers on your systems, then install $ gem bundle install then install, $ gem json 'i18n-0.7.0' install. then you start your ruby server.

You need to upgrade the bin/ folder. Run the following command and override if asked:

$ bundle exec rake rails:update:bin

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