2011-03-21 136 views
1

我想部署一個簡單的骨架Rails 3.0.5(和Ruby 1.9.2)應用程序Heroku,但遇到同樣的錯誤,當我打開網站,當我嘗試遷移D b。我使用heroku create --stack bamboo-mri-1.9.2創建了Heroku應用程序。一切工作在當地。Heroku部署和數據庫遷移問題

Code: https://github.com/curiousyogurt/SEE 
App: http://stormy-ice-778.heroku.com/ 
  1. 當要訪問的網站,我得到一個 「應用程序錯誤」;在日誌中,我得到以下錯誤(後面跟很多其他的信息):

    2011-03-20T17:25:31-07:00 app[web.1]: /app/cfde9dd3-c394-45fb-a0ef-72a753e83909/home/.bundle/gems/ruby/1.9.1/gems/railties-3.0.5/lib/rails/railtie/configuration.rb:77:in 'method_missing': undefined method `action' for #<Rails::Application::Configuration:0x00000001d398d8> (NoMethodError)

    Stack Trace: gist.github.com/878866

  2. 在做heroku rake db:migrate,我得到以下錯誤:

    rake aborted! undefined method 'action' for # /app/44666f97-ad08-444e-9f39-9ca7eb8fdc93/home/.bundle/gems/ruby/1.9.1/gems/railties-3.0.5/lib/rails/railtie/configuration.rb:77:in `method_missing'

    Stack Trace: gist.github.com/878870

這裏是我的Gemfile (刪除非生產零件):

gem 'rails', '3.0.5' 
gem 'haml' 
gem 'devise', :git => 'git://github.com/plataformatec/devise', 
       :branch => 'master' 
gem 'omniauth' 

我不確定接下來要去哪裏追蹤 這個問題。任何建議將不勝感激。

+0

你能列出更多的堆棧跟蹤嗎? – 2011-03-21 01:10:00

+0

當然。這裏是:gist.github.com/878866(上面#1的堆棧跟蹤);和https://gist.github.com/878870(上面#2的堆棧跟蹤)。 – CuriousYogurt 2011-03-21 01:20:45

+0

再一次! 'config/environments/production.rb'的內容如何?堆棧跟蹤指向該文件中的問題。 – 2011-03-21 01:33:08

回答

2
config.action.mailer.default_url_options = { :host => 'stormy-ice-778.heroku.com' } 

config/environments/production.rb應該

config.action_mailer.default_url_options = { :host => 'stormy-ice-778.heroku.com' } 

(其他城市action.maileraction_mailer)。

+0

謝謝你解決這個問題;對此,我真的非常感激。 – CuriousYogurt 2011-03-21 01:59:57