NameError: undefined local variable or method `itinerary' for main:Object

I am doing the sample application “trips-app” based on this slightly
deprecated set of instructions
https://ruby-geekcampbaguio.herokuapp.com/#2-database-crud

I’ll tell what worked so far and what has been different.

In the instructions it refers to db/migrations but on my version of
rails
it is db/migrate
I ran into this error but I resolved it
ActiveRecord::DuplicateMigrationNameError: Multiple migrations have the
name CreateItineraries
by finding the duplicate file in finder and just dragging it to the
trash.

Then I was able to perform a rake:db migrate

But the entire time I have been getting this error
NameError: undefined local variable or method itinerary' for main:Object from (irb):1 from /Users/dev/.rubies/ruby-2.2.2/bin/irb:11:in
Instead of the errors that are documented from the set of instructions I
am
using.

I found a great deal of similar errors on stackexchange and so on, but
so
far I’ve yet to glean yet specifically I am meant to do here.

Here is a sampling of the results one will come across on Yahoo! today
if
searching the boolean “NameError: undefined local variable or method for
main:Object” (sans the keyword `itinerary’)

http://stackoverflow.com/questions/19867354/nameerror-undefined-local-variable-or-method-user-for-mainobject

http://ruby.about.com/od/faqs/qt/Nameerror-Undefined-Local-Variable-Or-Method-A-For-Object-0x1001c92a0.htm

http://ruby-doc.org/core-2.2.2/NameError.html

https://groups.google.com/forum/#!topic/ziya-plugin/-YXdFbFaA5s

I have bolded the pages that I found helpful but I still need a specific
solution, any takers?

On 5 May 2015 at 19:15, Bailey J [email protected] wrote:

name CreateItineraries
by finding the duplicate file in finder and just dragging it to the trash.

Then I was able to perform a rake:db migrate

But the entire time I have been getting this error
NameError: undefined local variable or method itinerary' for main:Object from (irb):1 from /Users/dev/.rubies/ruby-2.2.2/bin/irb:11:in
Instead of the errors that are documented from the set of instructions I am
using.

Copy/paste here the entire command and results from the terminal for a
command that fails.
Also tell us the result of
ruby -v
and
rails -v
and tell us which operating system you are using.

Colin

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs