简体   繁体   中英

Capistrano Deploy fails Bundler::GemNotFound

For some reason my deployment has failed due to being unable to find the will_paginate gem, I haven't had a problem with adding new gems to my app and deploying previously.

If you go to My Site you will see the error.

I have tried adding

require "bundler/capistrano"

to my Capfile, but it still fails.

boot.rb

require 'rubygems'

# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)

require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])

Locally I added the gem, ran bundle and everything works..

Anything I can do to troubleshoot this or has anyone seen this before?

Thanks

This error seems to be coming whilst loading your app, not during deploy.

You should have require 'bundler/setup' somewhere in your app config.

In Rails this would generally be in config/boot.rb .

Bundler's Getting Started might help.

I have seen similar errors at times. This can be because of some dependency problems, which occur often because of gem updations, most of the time.

I think, you better check the will_paginate gem version in your application deployed environment. Then, you might get some clue about the error. Removing gemset if you are using gemset or removing the existing will_paginate gem and do 'bundle install' should resolve your problem.

Hope it Helps and let me know, if that does not solve your problem.

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