Reputation: 13
Why does my heroku app depends on will_paginate gem, which is not in my gemfile anymore?
Hello,
I have a rails 3.2.11 application running on Heroku. Since my last successful deployment to Heroku I have locally:
Locally this application runs fine.
When I deploy this app (from git) to heroku, I get following exception in the logs:
» 12:47:45.667 2013-12-07 11:47:45.613491+00:00 heroku web.1 - - Starting process with command `bundle exec rails server thin -p 31620 -e $RACK_ENV`
» 12:47:48.465 2013-12-07 11:47:48.410856+00:00 app web.1 - - => Booting Thin
» 12:47:48.564 2013-12-07 11:47:48.410856+00:00 app web.1 - - => Rails 3.2.11 application starting in production on http://0.0.0.0:31620
» 12:47:48.564 2013-12-07 11:47:48.410856+00:00 app web.1 - - => Call with -d to detach
» 12:47:48.564 2013-12-07 11:47:48.410856+00:00 app web.1 - - => Ctrl-C to shutdown server
» 12:47:48.564 2013-12-07 11:47:48.410856+00:00 app web.1 - - Connecting to database specified by DATABASE_URL
» 12:47:48.922 2013-12-07 11:47:48.860489+00:00 app web.1 - - Exiting
» 12:47:48.922 2013-12-07 11:47:48.861515+00:00 app web.1 - - /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:317:in `rescue in depend_on': No such file to load -- will_paginate (LoadError) from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:312:in `depend_on' from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:225:in `require_dependency' from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!' from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/engine.rb:438:in `each' from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/engine.rb:438:in `block in eager_load!' from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/engine.rb:436:in `each' from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/engine.rb:436:in `eager_load!' from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>' from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `instance_exec' from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `run' from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/initializable.rb:55:in `block in run_initializers' from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `each' from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `run_initializers' from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/application.rb:136:in `initialize!' from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in `method_missing' from /app/config/environment.rb:41:in `<top (required)>' from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require' from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `block in require' from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency' from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require' from /app/config.ru:3:in `block in <main>' from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval' from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize' from /app/config.ru:in `new' from /app/config.ru:in `<main>' from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval' from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file' from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:200:in `app' from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/commands/server.rb:46:in `app' from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app' from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:254:in `start' from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/commands/server.rb:70:in `start' from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/commands.rb:55:in `block in <top (required)>' from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/commands.rb:50:in `tap' from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/commands.rb:50:in `<top (required)>' from script/rails:6:in `require' from script/rails:6:in `<main>' EXCEPT
» 12:47:50.130 2013-12-07 11:47:50.075742+00:00 heroku web.1 - - Process exited with status 1
» 12:47:51.142 2013-12-07 11:47:50.088491+00:00 heroku web.1 - - State changed from starting to crashed
» 12:47:53.004 2013-12-07 11:47:42.195734+00:00 heroku web.1 - - State changed from crashed to starting
It appears that my app on Heroku still requires the will_paginate gem. How can I find out why?
I tried deploying this app to a new heroku app, which should basically take only the code from my Git and not refer to some previously deployed code/config, but the result is the same.
This is my Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.11'
# REPLACED BY KAMINARI gem: gem 'will_paginate' #, "~> 2.3.11", :source => 'http://gemcutter.org'
gem 'kaminari'
gem 'meta_search', "~> 1.1.3"
gem 'hirb', "0.5.0"
gem "paperclip", "~> 3.0"
gem 'i18n'
gem 'rake', '10.0.3'
# needed for amazon s3
gem 'aws-sdk'
# needed for mysql (cleardb mysql on heroku)
gem 'activerecord-mysql-adapter'
gem 'mysql2'
group :development, :test do
end
group :production do
gem 'pg'
# for heroku production
gem 'thin'
gem 'rails_12factor'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
# to be able to test thin locally
gem 'foreman'
gem "hirb", "0.5.0"
gem 'factory_girl'
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
Upvotes: 0
Views: 221
Reputation: 25029
You have a leftover initializer in /config/initializers/
that references will_paginate.
Upvotes: 2