我遇到了將Rail應用程序部署到Heroku的困難。我真的很感謝一個想法清單,以解決這個問題,我已經用盡了我的想法,正在訴諸把我的頭髮拉出來!部署到heroku生成插件的棄用警告,但沒有插件存在
短篇小說:heroku run rake db:migrate
產生一個錯誤:
Running rake db:migrate attached to terminal... up, run.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/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/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7)
rake aborted!
syntax error on line 7, col 11: `'
這看起來應該很容易解決。問題是,我沒有任何插件!
漫長的故事:我準備重新部署Rails應用程序進行分期。這是Heroku上的一個Rails 3.0應用程序,我剛剛完成了一次重大升級,其中包括升級到Rails 3.2,Ruby 1.9.2,刪除插件和重大改寫。我現在試圖推動Heroku的雪松堆棧做更多的測試。
我一直在努力解決這個問題幾天,並不斷思考我到了什麼地方,但我後來失望了。最近我認爲我的git repos不符合要求,並且Heroku遠程控制器包含一箇舊的提交這些插件。我不再認爲是這樣。 (我確實想檢查這個,但是由於這個錯誤,我無法進入Heroku控制檯驗證文件結構)。
要確認,我的供應商/插件文件夾肯定是空的,在我的本地主和遠程github回購。它應該在遠程Heroku分支上爲空,因爲我已經推送了所有更新(我甚至創建了一個完全空白的應用程序,並有一個新的遠程名稱進行測試,但得到了相同的錯誤)。我說供應商/插件是空的,但實際上供應商/插件不存在,在我刪除插件後被完全刪除。
我確實在早期版本的應用程序中安裝了兩個插件:HABTM複選框和fancybox-rails。這些都已被卸載rails plugin remove <<plugin name>>
。
我檢查了錯誤/app/rakefile:7
中引用的文件,但無法看到此行的任何錯誤MyApp::Application.load_tasks
。
如果我嘗試啓動heroku控制檯,該錯誤稍有不同,並且引用/app/config/environment.rb:5)
。我在這裏看不到任何東西MyApp::Application.initialize!
我已經經歷了所有可能的地方尋找這些插件的任何殘餘或老require
聲明,並且什麼也沒有。
我真的很感激任何想法,我還可以看看。如果需要,我可以提供更多信息,但我不確定在這個階段什麼是有用的!
感謝您幫助我保持頭髮!
編輯
我補充說,在錯誤中提到的Rake文件的全部內容。我看不到任何問題。
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
require 'rake'
MyApp::Application.load_tasks
嗨水手,謝謝你。我也看到了這些信息。但是我擔心我的db:migration rake被Heroku使用的插件中止。我認爲Heroku的插件會產生棄用警告,但耙子會繼續。這導致我相信別的事情正在發生。我會嘗試靜音警告,看看它是否允許我遷移數據庫。謝謝 – 2012-04-24 09:57:24
嗨水手,沉默貶值錯誤不幸的是沒有效果。隨着我對此進行更多的研究,我不認爲這是造成這種情況的插件。該錯誤引發了rakefile,但我看不到任何問題,並且該應用程序在本地主機上部署得很好。有任何想法嗎?我已經把完整的堆棧跟蹤git://gist.github.com/2480912.git – 2012-04-25 13:19:51