Reputation: 81
*Edited
In trying to deploy my Rails 4 app onto Heroku, I kept getting error messages even though my deployment was successful. I also needed to translate my app from using sqlite3 to postgres (edits to database.yml) What helped me was running:
heroku logs -- myAppName
where as before, I was only doing:
heroku logs
An error I got was a MissingTemplate. I found that I needed to update my production.rb file to include:
config.assets.compile = true
and in my Gemfile
group :production, :staging do
gem 'haml'
gem 'rails_12factor'
end
Upvotes: 2
Views: 2003
Reputation: 81
Happy to announce that I was finally able to get this working! The problem was found by running: heroku logs -- appname
I needed to put haml in my production.rb file, and a few other tricky things were missing. Thanks a bunch!
Upvotes: 0
Reputation: 153
The 5th last line of your console log is giving you the answer :)
2016-07-23T03:03:41.316258+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/connection_specification.rb:248:in `resolve_symbol_connection': 'localhost' database is not configured. Available: ["host", "development", "test", "production"] (ActiveRecord::AdapterNotSpecified)
You can't use localhost on heroku. Try production
instead
Upvotes: 1