1

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

Richlewis
  • 15,070
  • 37
  • 122
  • 283

2 Answers2

1

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.

lebreeze
  • 5,094
  • 26
  • 34
  • thanks for your answer, in my config/boot.rb i have require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']), could i do away with the if file exists? – Richlewis Apr 12 '13 at 09:50
  • It might be useful to post the contents of your `Gemfile` – lebreeze Apr 12 '13 at 11:47
  • i have raised another question rather than add to this one http://stackoverflow.com/questions/15970793/two-versions-of-gems-in-production-rails-deployment – Richlewis Apr 12 '13 at 11:57
1

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.

Prem
  • 5,844
  • 3
  • 25
  • 23
  • thank you, so to clarify remove the will_paginate gem in production run bundle install then re deploy? – Richlewis Apr 12 '13 at 11:23
  • im using version 3.04,however upon checking gem list in production, the will_paginate gem is not there, i have tried installing in production but makes no difference. Also noticed i have two versions of bundler- bundler (1.1.4, 1.1.3), in production and in development bundler (1.3.4) – Richlewis Apr 12 '13 at 11:41
  • I think, its better to use gemset to avoid such dependency issues and version conflicts. If that is taking time, try removing the bundler(both versions) in your production environment(if your's is the only application, running on the server), install bundler freshly and then,try "bundle install". – Prem Apr 12 '13 at 12:18
  • thanks, i raised another question which may be the root of the problem http://stackoverflow.com/questions/15970793/two-versions-of-gems-in-production-rails-deployment/15970996?noredirect=1#15970996 – Richlewis Apr 12 '13 at 12:20