1
votes

I'm trying to deploy a simple skeleton Rails 3.0.5 (and Ruby 1.9.2) app to Heroku, but encounter the same error when I open the website and when I try to migrate the db. I created the Heroku app with heroku create --stack bamboo-mri-1.9.2. Everything works locally.

Code: https://github.com/curiousyogurt/SEE
 App: http://stormy-ice-778.heroku.com/
  1. When going to the website, I get an "Application Error"; in the logs, I get the following error (followed by lots of other information):

    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. When doing heroku rake db:migrate, I get the following error:

    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

Here is my Gemfile (non-production parts removed):

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

I'm not sure where to go next in trying to track down this problem. Any suggestions would be greatly appreciated.

1
Can you list a little more of the stack trace? - Michelle Tilley
Sure thing. Here it is: gist.github.com/878866 (the stack trace for #1 above); and gist.github.com/878870 (the stack trace for #2 above). - CuriousYogurt
One more! How about the contents of config/environments/production.rb? The stack trace points to a problem in that file. - Michelle Tilley
That fixed it. Here is the production.rb: gist.github.com/878896 ... and it turns out that by commenting out config.action.mailer.default_url_options = { :host => 'stormy-ice-778.heroku.com' }, I was able to solve the problem. I'm not really sure why it caused the problem; any thoughts? Thanks so much! - CuriousYogurt

1 Answers

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

in your config/environments/production.rb should be

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

(change action.mailer to action_mailer).