尝试推送到Heroku时出现以下错误。它适用于localhost:3000并且不确定从哪里开始。我删除了vendor / plugins中的文件(在localhost上工作),但在尝试上传到Heroku时仍然产生了同样的错误。
C:\basecode>heroku run rake db:migrate
Running `rake db:migrate` attached to terminal... up, run.9170
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 i
n your Gemfile, or fold them in to your app as lib/myplugin/* and config/initial
izers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonr
ails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required
)> at /app/Rakefile:4)
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/initial
izers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonr
ails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required
)> at /app/Rakefile:4)
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 i
n your Gemfile, or fold them in to your app as lib/myplugin/* and config/initial
izers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonr
ails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required
)> at /app/Rakefile:4)
== CreateMicroposts: migrating ===============================================
-- create_table(:microposts)
NOTICE: CREATE TABLE will create implicit sequence "microposts_id_seq" for serial column "microposts.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "microposts_pkey" for table "microposts"
-> 0.0521s
-- add_index(:microposts, [:user_id, :created_at])
-> 0.0462s
== CreateMicroposts: migrated (0.0987s) ======================================
== CreateRelationships: migrating ============================================
-- create_table(:relationships)
NOTICE: CREATE TABLE will create implicit sequence "relationships_id_seq" for serial column "relationships.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "relationships_pkey" for table "relationships"
-> 0.0478s
-- add_index(:relationships, :follower_id)
-> 0.0440s
-- add_index(:relationships, :followed_id)
-> 0.0464s
-- add_index(:relationships, [:follower_id, :followed_id], {:unique=>true})
-> 0.0484s
== CreateRelationships: migrated (0.1876s) ===================================
C:\basecode>heroku open
Opening nameless-tundra-1907... done
C:\basecode>
答案 0 :(得分:6)
删除你的vendor / plugins / .gitkeep(如果你有的话)
git checkout master
git rm vendor/plugins/.gitkeep
将这些行添加到Gemfile
group :production do
gem 'rails_12factor'
end
运行bundle命令
bundle install
提交文件Gemfile和Gemfile.lock
git add Gemfile Gemfile.lock
git commit -m 'Added gem rails_12factor to avoid warnings on heroku'
推送您的更改并永远摆脱这些警告
git push heroku master
答案 1 :(得分:1)
如果您尝试删除该插件,则需要运行rails plugin remove [your-plugin]
,而不仅仅是删除该文件夹。
此外,我相信heroku会为您的应用添加一些插件,并且可能会弃用这些插件。