Possible Duplicate:
Rails 2.3-style plugins and deprecation warnings running task in Heroku
A few days ago I decided to upgrade my Rails 3.1 app to Rails 3.2. Everything works well on my local machine, both in production and development environments. When I push the app to Heroku I get an error and the app crashes.
Error message:
2012-01-31T11:36:18+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-01-31T11:36:18+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-01-31T11:36:19+00:00 app[web.1]: => Call with -d to detach
2012-01-31T11:36:19+00:00 app[web.1]: => Booting Thin
2012-01-31T11:36:19+00:00 app[web.1]: => Rails 3.2.0 application starting in production on http://0.0.0.0:25836
2012-01-31T11:36:19+00:00 app[web.1]: => Ctrl-C to shutdown server
2012-01-31T11:36:19+00:00 app[web.1]: Exiting
2012-01-31T11:36:19+00:00 app[web.1]: /app/config/initializers/carrier_wave.rb:1:in `<top (required)>': uninitialized constant CarrierWave (NameError)
2012-01-31T11:36:19+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.0/lib/rails/engine.rb:587:in `each'
2012-01-31T11:36:19+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.0/lib/rails/initializable.rb:30:in `instance_exec'
2012-01-31T11:36:19+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.0/lib/rails/initializable.rb:30:in `run'
2012-01-31T11:36:19+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.0/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
2012-01-31T11:36:19+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.0/lib/rails/application.rb:136:in `initialize!'
2012-01-31T11:36:19+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.0/lib/rails/engine.rb:587:in `block in <class:Engine>'
2012-01-31T11:36:19+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
2012-01-31T11:36:19+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
2012-01-31T11:36:19+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.0/lib/rails/initializable.rb:54:in `each'
2012-01-31T11:36:19+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-01-31T11:36:19+00:00 app[web.1]: from /app/config.ru:4:in `block in <main>'
2012-01-31T11:36:19+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.0/lib/rails/initializable.rb:54:in `run_initializers'
2012-01-31T11:36:19+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
2012-01-31T11:36:19+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2012-01-31T11:36:19+00:00 app[web.1]: from /app/config.ru:1:in `<main>'
2012-01-31T11:36:19+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.0/lib/rails/commands/server.rb:46:in `app'
2012-01-31T11:36:19+00:00 app[web.1]: from /app/config.ru:1:in `new'
Gemfile:
source 'http://rubygems.org'
gem 'rails', '3.2.0'
gem 'jquery-rails'
gem 'devise'
gem "cancan"
gem "friendly_id", "~> 4.0.0.beta14"
gem 'rmagick'
gem 'ancestry'
gem "fog"
gem 'dragonfly', '~>0.9.9'
gem 'rack-cache', :require => 'rack/cache'
gem 'tinymce-rails'
group :development, :test do
gem "mysql2", "~> 0.3.11"
gem 'sqlite3'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'pg'
gem 'thin'
gem 'sass-rails', " ~> 3.2.3"
gem 'coffee-rails', "~> 3.2.1"
gem 'uglifier', '>= 1.0.3'
end
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
group :test do
# Pretty printed test output
gem 'turn', '0.8.2', :require => false
end
I emailed Heroku support and the response was
Hello -
The last line is pointing to an issue with Fog - a library used to communicate with cloud providers such as Amazon.
Will you ensure the 'fog' gem has been added to your app?
I am 100% sure the gem is there as you can see my gem file.Then again another response
Are you able to reproduce this issue locally in 'production' mode?
If you add the 'thin' gem to your Gemfile, you can simulate the Heroku environment with 'bundle exec thin start -e production'
January 30, 2012 11:43 am
I had already done this and everything works on on my local machine. I am a little lost as to the solution. I read this Rails 2.3-style plugins and deprecation warnings running task in Heroku and I was discouraged from trying that hack as a solution. As another solution I decided to downgrade my app to Rails 3.1 and the issue still persists. What am I missing here?
I suspect that this came from Carrierwave gem which I have removed along with uploader. But Heroku still refers to it. There is nothing in my config file about carrier-wave.