Reputation: 439
I built a webapp for a class that uses a weather API to display the local weather on a single page. I've uploaded the app to Heroku, but when I try to view the page, I get a 500 error. I've looked at the logs, but I can't decipher what is going wrong exactly. Can someone please take a look at the logs and point out what's going wrong?
Here is a link to the logs: https://gist.github.com/allredbm/70daea5a4c372c644cac
Upvotes: 0
Views: 61
Reputation: 76774
The error is as follows:
app/controllers/home_controller.rb:18:in `index'
NoMethodError (undefined method `[]' for nil:NilClass)
On line 18
of your home_controller
(index
action), you're referencing a variable with a []
. The variable isn't defined.
You need to make sure the variable is defined before trying to reference it.
Upvotes: 1
Reputation: 1072
You can view the whole backtrace by doing either:
config.consider_all_requests_local = true
in config/environments/production.rb
- this is the quickestUpvotes: 0