2

尝试推送到 Heroku 时出现以下错误。它适用于 localhost:3000 并且不知道从哪里开始。我删除了供应商/插件中的文件(在本地主机上工作),但在尝试上传到 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>
4

2 回答 2

6

删除你的 vendor/plugins/.gitkeep (如果你有的话)

git checkout master
git rm vendor/plugins/.gitkeep

将这些行添加到您的 Gemfile

group :production do
  gem 'rails_12factor'
end

运行捆绑命令

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
于 2013-11-12T02:05:13.017 回答
1

如果您尝试删除插件,则需要运行rails plugin remove [your-plugin],而不仅仅是删除文件夹。

此外,我相信 heroku 会在您的应用程序中添加一些插件,这些插件可能已被弃用。

于 2013-07-19T20:19:38.453 回答