small medium large xlarge

Generic-user-small
03 Jun 2013, 02:26
Roger McDonald (8 posts)

I am enjoying the new Rails 4 Agile Web Dev book and noting the rather significant syntax changes. I am learning from scratch in Ruby2 and Rails4 and can recommend this learner route. I am using the tut for registrations instead of product sales and have made a couple of changes to the store page.

There is however an error on page 121: /depot_g/db/migrate/20121130000005_combine_items_in_cart.rb It requires a 5th ‘end’ like this:..

end if.. end do end (modelname).. end do cart.. end def.. end class..

  • It will not migrate without the fifth ‘end’ I hope this helps Love the book so far. Roger
Samr_small_pragsmall
02 Jun 2013, 10:49
Sam Ruby (634 posts)

On that page is an excerpt from the migration. That excerpt only includes the definition of the method… it doesn’t show the begin or end of the class.

The full class can be found at http://media.pragprog.com/titles/rails4/code/rails40/depot_g/db/migrate/20121130000005_combine_items_in_cart.rb

Generic-user-small
03 Jun 2013, 02:25
Roger McDonald (8 posts)

Can be confusing for learners!

You must be logged in to comment