29 Mar 2013, 10:29
Generic-user-small

Mr H (8 posts)

Hi guys, I am stuck with the Adding the Ajax to to the cart. create.js.rjs never get called !!!!

Shouldn’t the create.is.rjs referenced somewhere in the app?

Thanks

29 Mar 2013, 18:42
Samr_small_pragsmall

Sam Ruby (584 posts)

Do you have the P1.0 printing of the 4th edition? If so, you really need to be running with Rails 3.0.5, as described in section 1.4 of the book. If you have a different printing, can you identify where in the book you found a reference to create.js.rjs?

31 Mar 2013, 12:26
Generic-user-small

Mr H (8 posts)

Page 160 “Download depot_l/app/views/line_items/create.js.rjs”

I have got the 4th edition. I am running: Ruby ruby 1.9.3p327 Rails 3.2.13

Thanks

31 Mar 2013, 12:57
Samr_small_pragsmall

Sam Ruby (584 posts)

On the page before the table of contents, there should be a page with a title of ‘Pragmatic Bookshelf’. On the second to the last line of that page, you should see a printing number and a date.

Printing P1.0 is for Rails 3.0.5 has a download link of http://media.pragprog.com/titles/rails4/code/rails30/depot_l/app/views/line_items/create.js.rjs. Starting with P2.0, the download link reads http://media.pragprog.com/titles/rails4/code/rails31/depot_l/app/views/line_items/create.js.erb. Subsequent printings link to the /rails32/ or /rails40/ versions of this file.

Can I ask what printing you have?

01 Apr 2013, 02:19
Generic-user-small

Mr H (8 posts)

ISBN-10: 1-934356-54-9 ISBN-13: 978-1-934356-54-8 Printed on acid-free paper. B8.0 printing, September 9, 2010 Version: 2010-9-9

01 Apr 2013, 20:20
Samr_small_pragsmall

Sam Ruby (584 posts)

B8.0 was for Rails 3.0.0. Rails changed significantly in release 3.1. I encourage you to read section 1.4 carefully, and restart with Rails 3.0.

01 Apr 2013, 23:28
Generic-user-small

Mr H (8 posts)

Sorry is there another book with different printing number? If yes then I will buy that.

02 Apr 2013, 00:33
Samr_small_pragsmall

Sam Ruby (584 posts)

B8.0 was the eighth beta before the first printing of the fourth edition. There were two more betas before P1.0.

The latest paper printing is P3.0, and covers Rails version 3.2.6.

The current ebook printing is P3.1, and covers Rails 4.0.0.beta1. If you buy the ebook from Pragmatic Programming, you will get free updates at least through the final Rails 4 release.

http://pragprog.com/book/rails4/agile-web-development-with-rails

02 Apr 2013, 00:39
Generic-user-small

Mr H (8 posts)

I actually just bought the 2013 release so hopefully I wont have any issue. I will post here when I went through the book again.

Thanks

  You must be logged in to comment