02 Feb 2013, 21:58
Generic-user-small

drew gilliam (2 posts)

Hi when running the app in the sim, I can start the app, and input a color hex, but when I press search, the app terminates with this error:

*** Terminating app due to uncaught exception ‘NameError’, reason: ‘search_controller.rb:48:in `block in viewDidLoad’: uninitialized constant SearchController::Color (NameError)

Citing this line as the culperite: @Color.find(hex) do |color|@

I cut and pasted the code from the examples to make sure I wasn’t typing something wrong to no avail. However I did download the example codebase and successfully run it with that. Any ideas on what I might be missing or doing wrong? It almost seems like an environment issue at this point.

Thanks!

04 Feb 2013, 00:31
Watermark copy 2_test_pragsmall

Clay Allsopp (8 posts)

Hmm so that probably means the Color class wasn’t loaded. Did you include the ./models/color.rb file?

One quick way to verify is to do a rake clean followed by a rake, and observe if that color.rb is included in the output.

  You must be logged in to comment