0

My app works perfectly locally, but I have some issues after deploying to Heroku. When I want to create a new car, I click on "New car" link, which leads to /cars/new. App crashes, Heroku logs:

NoMethodError (undefined method `fetch_value' for nil:NilClass):
  app/controllers/cars_controller.rb:20:in `new'

This line in cars_controller is simply

@car = Car.new

In my app I use Devise, OmniAuth and nested resources, though car is a 'parent' resource, so it isn't a problem with nested routes or something. It works perfectly locally.

UPDATE: after seeding database with some cars, error dissapeared and it's possible to access cars/new. But when database is empty, it throws this error. What should I do?

Tamer Shlash
  • 9,314
  • 5
  • 44
  • 82
Jes
  • 323
  • 2
  • 18

1 Answers1

0

Maybe something attribute name is a word reserved.

thiaguerd
  • 807
  • 1
  • 7
  • 16