9

Possible Duplicate:
Rails 2.3-style plugins and deprecation warnings running task in Heroku

I am running rake db:migrate gives me the following warnings and then aborts:

$ heroku rake db:migration --trace
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support forthese 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/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7)
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/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7)
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/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7)
rake aborted!
Don't know how to build task 'db:migration'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task_manager.rb:49:in `[]'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:115:in`invoke_task'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/app/.bundle/gems/ruby/1.9.1/bin/rake:19:in `load'
/app/.bundle/gems/ruby/1.9.1/bin/rake:19:in `<main>'

when I checked vendor/plugins folder I only found a file called .gitkeep and is empty

Community
  • 1
  • 1
Hesham
  • 525
  • 1
  • 5
  • 11

3 Answers3

20

As an FYI in case people arrive here from search engines due to the question title. The deprecation warning is caused by Heroku injecting plugins - see Jared Beck's answer on this question: Rails 2.3-style plugins and deprecation warnings running task in Heroku

The solution proposed by nzifab above is valid for the underlying issue but this wasn't what was raised in the question title

Community
  • 1
  • 1
Dan Burke
  • 201
  • 2
  • 2
  • 6
    And if you think further clicks are unnecessary. Just put `gem 'rails_12factor'` in your GemFiles, run `bundle install` locally, `git commit -m "Fix for heroku deprecating warning on-compile"` and finally `git push heroku master`. – Annie Oct 30 '13 at 07:50
2

vendor/plugins isn't the problem here, those are only warnins. It's heroku run rake db:migrate..

possibly just heroku rake db:migrate if you're not on the Cedar stack (note migrate, not migration)

nzifnab
  • 15,876
  • 3
  • 50
  • 65
  • Although the "problem" of the error shown is not the deprecation, the question (title) appear to be about the deprecation messages, whose are explained in the question which this is possible duplicated – Douglas Lise Jan 18 '14 at 12:11
  • Heh, don't remember making this answer. I guess it was 2 years ago - The answer and comments below are correct for the deprecation message. Heroku injects plugins into vendor/plugins so your app can work on the heroku stack. Adding the gem `rails_12factor` to your Gemfile (as noted below) will remove these warnings. – nzifnab Jan 20 '14 at 17:12
  • OK, I am only arguing about this answer are marking as the "correct" answer for this question, making some confusion. – Douglas Lise Jan 20 '14 at 19:57
  • That's on Hesham. I agree this one should not be marked correct. – nzifnab Jan 20 '14 at 20:23
1

What I feel of this is, You must have made some changes in any of the gems and copied the hierarchy and the files with changes in the "..app/vendor/plugins" folder.

If this is the case, then this is just a warning to tell that you should copy plugins in "lib" folder. You must have seen the same when you start you webrick in development mode.