Ruby on rails 部署到Heroku时出错(不推荐使用警告:供应商/插件中有Rails 2.3风格的插件)

Ruby on rails 部署到Heroku时出错(不推荐使用警告:供应商/插件中有Rails 2.3风格的插件),ruby-on-rails,ruby,heroku,Ruby On Rails,Ruby,Heroku,我在尝试推送到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

我在尝试推送到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>
C:\basecode>heroku运行rake数据库:迁移
正在运行附加到终端的“rake db:migrate”。。。起来,跑
弃用警告:在供应商/插件中有Rails 2.3风格的插件!支持
因为这些插件将在Rails 4.0中删除。把它们搬出去,我把它们捆起来
n您的Gemfile,或者将它们作为lib/myplugin/*和config/initial折叠到您的应用程序中
izers/myplugin.rb。有关这方面的更多信息,请参阅发行说明:http://weblog.rubyonr
ails.org/2012/1/4/rails-3-2-0-rc2-has-release。(从at/app/Rakefile:4调用)
弃用警告:在供应商/插件中有Rails 2.3风格的插件!支持
因为这些插件将在Rails 4.0中删除。把它们拿出来,捆起来
您的Gemfile,或者将它们作为lib/myplugin/*和config/initial折叠到您的应用程序中
izers/myplugin.rb。有关这方面的更多信息,请参阅发行说明:http://weblog.rubyonr
ails.org/2012/1/4/rails-3-2-0-rc2-has-release。(从at/app/Rakefile:4调用)
弃用警告:在供应商/插件中有Rails 2.3风格的插件!支持
因为这些插件将在Rails 4.0中删除。把它们搬出去,我把它们捆起来
n您的Gemfile,或者将它们作为lib/myplugin/*和config/initial折叠到您的应用程序中
izers/myplugin.rb。有关这方面的更多信息,请参阅发行说明:http://weblog.rubyonr
ails.org/2012/1/4/rails-3-2-0-rc2-has-release。(从at/app/Rakefile:4调用)
==CreateMocrosts:正在迁移===============================================
--创建表格(:MicroPost)
注意:CREATE TABLE将为序列列“microposts.id”创建隐式序列“microposts\u id\u seq”
注意:CREATE TABLE/PRIMARY键将为表“microposts”创建隐式索引“microposts_pkey”
->0.0521s
--添加索引(:microposts,[:user\u id,:created\u at])
->0.0462s
==CreateMicroposts:已迁移(0.0987s)======================================
==创建关系:迁移============================================
--创建表(:关系)
注意:CREATE TABLE将为序列列“relationships.id”创建隐式序列“relationships\u id\u seq”
注意:CREATE TABLE/PRIMARY KEY将为表“relationships”创建隐式索引“relationships\u pkey”
->0.0478s
--添加索引(:关系,:跟随者id)
->0.0440s
--添加索引(:关系,:后跟\u id)
->0.0464s
--添加索引(:relationships,[:follower_id,:follower_id],{:unique=>true})
->0.0484s
==CreateRelationships:已迁移(0.1876s)===================================
C:\basecode>heroku打开
开幕式无名苔原1907。。。完成
C:\basecode>

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


另外,我相信heroku在你的应用程序中添加了一些插件,这些插件可能已经过时了。

删除你的供应商/plugins/.gitkeep(如果你有)

将这些行添加到您的文件中

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

我讨厌这个警告,我希望能有一个很好的答案来解决它。它的可能重复很奇怪。在构建应用程序时,我分阶段保存了它。当我尝试将其上传到剥离到基本用户注册/登录的位置时,它似乎起作用,因此我知道是后期的某个原因导致了错误。只是不确定什么?我不知道需要运行该命令来删除文件,所以谢谢你。据我所知,heroku确实向应用程序中注入了插件(heroku自己显然承认这是一个问题),但似乎没有任何直接的文档来解决这个问题。也许我会在rails 4.0中重建应用程序,省去麻烦。
git push heroku master