Beginning Ruby on Rails E-Commerce : Errata Help

I'm almost there.
did you gett errors when running the test on page 101?

ruby test/integration/book_test.rb

it ran for me before adding the select and option tags, now I get

expected tag, but no tag found matching {:content=>"Ruby for

Dummies", :tag=>"td"} in: ...(html code for the page)
when i run it.

I've copied the code fron the source and it still fails.
it works when i use the web interface... I'm lost

I remember something similar to that error. I will post the actual error message when I get back home. For the time being you can comment out the assertions that is checking for those tags.

This is really annoying, author has not responded to my emails. Apress does not have any forum for errata help. Do the authors and the publisher still live in caves? Book is good but the support is poor compared to other publishers like Pragmatic programmers and Manning.

I have encountered two problems so far, one with migration and the other with assertion that checks for html tags. To see what was going on with the migration, I did: rake db:migrate --trace

For some weird reason it seems to think that it has to run the migration for create tables (the previous migration) as well as the add cover_image column migration. For the time being, I commented out the entire file for the create books table and author_books table in the migration before add cover_image column migration.

this line is causing it to fail.
assert_tag :tag => 'td', :content => parameters[:book][:title]

when i comment it out it runs.
now like i said before that when i ran this test from 93 it ran fine.
this is why i am confused.

I bought the companion e-book on friday and still haven't recieved my
pdf yet. I'm not to happy with their 'support' either

I get the following error message:

expected tag, but no tag found matching {:content=>"Ruby for Dummies",
:tag=>"td"} in:

when the assertion:

assert_tag :tag => 'option', :attributes => { :value => publisher.id }

gets executed. So, it looks like we both have the same problem. I have
commented out the following two assert statements for the time being:

assert_tag :tag => 'option', :attributes => { :value => publisher.id }
assert_tag :tag => 'select', :attributes => { :id => 'book[author_ids][]' }

Heads up on another issue, the book does not tell you to install
RedCloth. You will run into problem on page number 128. So you must
install RedCloth to use the textilize method. On Mac I did this: sudo
gem install RedCloth

Thanks for the heads up.

One of the things that the book does not mention is that the fixtures that you use must have proper data. Copy all the fixtures files from the downloaded source and give it a shot. It may not solve all problems but atleast we have exhausted all options.

Bala Paranj wrote:

I have tried to fix this problem extensively without any success.
Comment out the line with assert_tag and keep going.
One thing very frustrating about this otherwise excellent book
(Beginning Ruby on Rails E-Commerce) is that the authors have not set
up a site to provide feedback/fixes etc.
Bharat

They have a companion site at http://www.railsecommerce.com/ but I
don't know if there's a defined mechanism for feedback. Perhaps an
e-mail to Jarkko will suffice?

There seem to be some problems with some of the examples, so hopefully
they can get something up soon on there! The mailing list isn't the
best place for these kinds of things (especially since Jarkko isn't
involved in these conversations!).

Good luck,
Jeremy

There is another related thread on this list. Change the test_process.rb to the implementation shown below:

 --- vendor/rails/actionpack/lib/action_controller/test_process.rb def html_document
HTML::Document.new(@response.body)
end
Let us know if that fixes the problem.

This weekend was ruined because of this book. I am actually exhausted from trying to learn from this book. I worked this book till page 112 and deleted everything and started all over again to see if I can get it running. This book is just draining my energy.

I would suggest others to stay away from this book. Unless you have lot of time and energy to waste. You can think about buying this book if the publisher comes up with a revised edition that fixes all the problems.

Taylor Strait wrote:

Just don't get bogged down if a test fails - I didn't! Focus on the programming concepts.

Glad somebody else has adopted this attitude. :wink:

BTW - I just visited the site for the book:
http://www.railsecommerce.com/

and lo and behold they've started a google group for the book:

http://groups.google.com/group/railsecommerce

Best,
Don C.

Secondbridge wrote:

BTW - I just visited the site for the book:
http://www.railsecommerce.com/

and lo and behold they've started a google group for the book:

http://groups.google.com/group/railsecommerce

Yup,

And we're also not living in a cave, it's just next to impossible to
keep up with the volume of this list. Hence the specific list for the
book.

//jarkko

Bala Paranj wrote:

One of the things that the book does not mention is that the fixtures that
you use must have proper data. Copy all the fixtures files from the
downloaded source and give it a shot. It may not solve all problems but
atleast we have exhausted all options.

Actually, on page 114:

"Therefore, we need to expand our ... fixture files in test/fixtures.
You can download the files from the Source Code/Downloads section of
www.apress.com."

There were just no idea to list all the fixtures in the book. So after
that point the book assumes you have the downloaded fixtures. Before
it, you should not need them if you have created the fixtures like told
in the book.

Best,
//jarkko

Readers don’t really care if George is threatening you with offshoring or if he does not have money to hire programmers, they care only about getting the code work so that they can learn something from the book.

It is very annoying to read about irrelevant things about George The Great when the relevant instructions are missing. It would not hurt to repeat the instructions to get the code running. Sorry for the rant, but George really pisses me off.