We try to keep our books accurate, but sometimes mistakes creep
in. This page lists the errors submitted by our astute readers.
If you've found a new error, please
submit it.
The latest version of the book is B1.6,
released 2 months ago.
If you've bought a PDF of the book and would like to upgrade
it to this version (for free), visit your
home page.
| PDF |
Paper |
Description |
Found in |
Fixed in |
| all |
|
#35399: A common requirement that clients have is the ability to create URLs with hyphens rather than underscores (i.e., good looking and SEO optimized URLs). It would be nice if the Rails book included some insight on how best to achieve this. Permalink-Fu is one option. Is it the best option? Is it the only option?--Ricky Robinson #35399: A common requirement that clients have is the ability to create URLs with hyphens rather than underscores (i.e., good looking and SEO optimize ...more...
|
B1.6
22-Oct-08
|
|
| .com |
|
#36056: hxxp://www.pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition --- release dates says March 15, 2008. I think you mean March 15, 2009. #36056: hxxp://www.pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition --- release dates says March 15, 2008. I think you mean ...more...
|
B1.6
22-Nov-08
|
|
| ALL |
|
#35550: It would be great to see a section on the symbols used in rails with a description of what each is used for rather than an example.
e.g.
=> This symbol assigns ...
| Still don't know what this does
# Is this a way of converting a variable to a string?
{}
()
<
GSub with all those /\ things after it. I really haven't got a clue what this is or how it works. Can't find any info on this anywhere.
etc...
I have a number of times struggled to understand the syntax used whilst developing the Depot app (And still am in some cases) and when I have had to go and look up what a # is doing in the middle of a string for example I have struggled to find a reference that explains what it is and how it works.
I suppose a quick reference guide is what I'm looking for.
Thanks
James--James West #35550: It would be great to see a section on the symbols used in rails with a description of what each is used for rather than an example.
e.g.
=> ...more...
|
B1.6
30-Oct-08
|
|
| 18 |
|
#35173: .. such as AJAX and RESTful
inter faces into their code: support is built in. (And if you’re not familar with
AJAX and REST inter faces, never fear —we’ll explain them later on.)
AJAX is not defined until page 125.
Restful is never defined. A little googling showed that Sam Ruby has written "Restful Web Services" and DHH wrote the forward for the book, so perhaps you know too much about Restful.
All I was looking for is a simple definition of Restful which I found at wikipedia (so maybe it isn't even right)
http en.wikipedia.org /wiki/ Representational_State_Transfer
Systems which follow Fielding’s REST principles are often referred to as “RESTful”.
--Jim Oser #35173: .. such as AJAX and RESTful
inter faces into their code: support is built in. (And if you’re not familar with
AJAX and REST inter faces, n ...more...
|
B1.6
12-Oct-08
|
|
| 30 |
|
#35323: I would expect much more Hyperlinks in a book which is deliviered electronically (PDF).
(Dave says: all cross references within the PDF, and (in theory) all external URLs are hyperlinked. Could you e-mail me (dave@pragprog.com) with additional links you feel we should have?)--Thomas Pellizzari #35323: I would expect much more Hyperlinks in a book which is deliviered electronically (PDF).
(Dave says: all cross references within the PDF, an ...more...
|
B1.6
18-Oct-08
|
|
| 31 |
|
#35487: Last paragraph on the page:
"The most common templating scheme, called ERb embeds snippets ..."
should be
"The most common templating scheme, called ERb, embeds snippets ..."--Morris Keesan #35487: Last paragraph on the page:
"The most common templating scheme, called ERb embeds snippets ..."
should be
"The most common templating ...more...
|
B1.6
27-Oct-08
|
|
| 33 |
|
#35251: I think you really should mention heroku.com as a way to develop an application without having to install everything. It's invaluable for learning and playing around without committing the time to getting a development environment set up.
Thanks for the awesome work!
Victor--Victor Marius Costan #35251: I think you really should mention heroku.com as a way to develop an application without having to install everything. It's invaluable for lea ...more...
|
B1.6
14-Oct-08
|
|
| 36 |
|
#35013: Doesn't this command work for all operating systems, not just Mac OS X?
When would this step be necessary?
Couldn't one just do
rake db:migrate
to see if the database is configured?
The book states:
The following step is rarely necessary, but can be helpful if things continue to
go wrong. You can verify which version of sqlite3 your sqlite3-ruby inter face
is bound to by running the following either as a standalone program, or from
within irb, or from within ruby script/console.
require 'rubygems'
require 'sqlite3'
tempname = "test.sqlite#{3+rand}"
db = SQLite3::Database.new(tempname)
puts db.execute('select sqlite_version()')
db.close
File.unlink(tempname)
--Jim Oser #35013: Doesn't this command work for all operating systems, not just Mac OS X?
When would this step be necessary?
Couldn't one just do
rake db:mig ...more...
|
B1.6
07-Oct-08
|
|
| 36 |
|
#35014: Instead of saying 10.4 and 10.5, and then latter referring to Tiger and Leopard, but not telling the reader that 10.4 is Tiger, and 10.5 is Leopard,
why not say 10.4.x and 10.5.x and for versions greater than 10.5.x look on your website for instructions?
That way, 3 mac releases from now, people won't be pondering what version was Tiger and what version was Leopard.
Also do these instructions imply equally well for the client version as well as the server version of 10.4.x and 10.5.x?--Jim Oser #35014: Instead of saying 10.4 and 10.5, and then latter referring to Tiger and Leopard, but not telling the reader that 10.4 is Tiger, and 10.5 is Le ...more...
|
B1.6
07-Oct-08
|
|
| 36 |
|
#35015: Instead of saying 10.4 and 10.5, and then latter referring to Tiger and Leopard, but not telling the reader that 10.4 is Tiger, and 10.5 is Leopard,
why not say 10.4.x and 10.5.x and for versions greater than 10.5.x look on your website for instructions?
That way, 3 mac releases from now, people won't be pondering what version was Tiger and what version was Leopard.
Also do these instructions imply equally well for the client version as well as the server version of 10.4.x and 10.5.x?--Jim Oser #35015: Instead of saying 10.4 and 10.5, and then latter referring to Tiger and Leopard, but not telling the reader that 10.4 is Tiger, and 10.5 is Le ...more...
|
B1.6
07-Oct-08
|
|
| 37 |
|
#36136: In the installation of Linux (Ubuntu 8.10 here)..
The -y apparently isn't needed any longer for the line:
sudo gem install -y rails
Upon running this command, there's an INFO: 'gem install -y' is now default and will be removed
--Bob McCormick #36136: In the installation of Linux (Ubuntu 8.10 here)..
The -y apparently isn't needed any longer for the line:
sudo gem install -y rails
...more...
|
B1.6
26-Nov-08
|
|
| 37 |
|
#35953: The current version of ubuntu does not seem to have a working copy of gems. I get strange error messages when I try to update. Just download ruby + gems from the ruby on rails website.--Stephen Cuzzort #35953: The current version of ubuntu does not seem to have a working copy of gems. I get strange error messages when I try to update. Just download ...more...
|
B1.6
17-Nov-08
|
|
| 38 |
|
#35488: In the penultimate paragraph, in the sentence, "It’s a simple way to ensure that accidential breakages get immediate attention."
"accidential" should be "accidental"--Morris Keesan #35488: In the penultimate paragraph, in the sentence, "It’s a simple way to ensure that accidential breakages get immediate attention."
"accident ...more...
|
B1.6
27-Oct-08
|
|
| 38 |
|
#35016: Was:
How to change the version of Rails that your
application is using is described in the sidebar on page 246.
To: How to change the version of Rails that your application is using is described on pages 245 to 247.
Comment:
freeze is mentioned on pages 41, 245, 246, and 247--Jim Oser #35016: Was:
How to change the version of Rails that your
application is using is described in the sidebar on page 246.
To: How to change the v ...more...
|
B1.6
07-Oct-08
|
|
| 38 |
|
#35017: Since there are multiple authors, does it make sense to say
I write my Rails programs using a programmer’s editor
wiihout identifying who I is?
Perhaps one could say that Mac OS X users prefer TextMate, Xcode, Netbeans, vi, vim, and emacs.
Linux users use:
Window users use:
What does James Duncan Davidson use and why?--Jim Oser #35017: Since there are multiple authors, does it make sense to say
I write my Rails programs using a programmer’s editor
wiihout identifying wh ...more...
|
B1.6
07-Oct-08
|
|
| 41 |
|
#35489: Footnote 5 makes no sense. It says the same thing as the footnoted sentence. Both say to use the command "gem server". Either this command should be different for one version, or the footnote is unnecessary--Morris Keesan #35489: Footnote 5 makes no sense. It says the same thing as the footnoted sentence. Both say to use the command "gem server". Either this command ...more...
|
B1.6
27-Oct-08
|
|
| 41 |
|
#35018: To view the Rails API documentation, open the location
doc/api/index.html ( or rails_apps/demmy_app/doc/api/index.html)
with a browser.--Jim Oser
|
B1.6
07-Oct-08
|
|
| 43 |
|
#34809: Reference/link "Postgres hxxp://ruby.scripting.ca/postgres/" is incorrect. Link is broken (yields 404 page; looks like domain wasn't renewed and got picked up by domain squatter.)
From what I've been able to gather, the (most) official source for a Ruby-based interface to PostgreSQL specifically (as opposed to Ruby/DBI) is via the Ruby-PG project:
hxxp://rubyforge.org/projects/ruby-pg
[Had to munge the protocol since the errata form doesn't allow URL posting in errata reports.]--Mark Glossop #34809: Reference/link "Postgres hxxp://ruby.scripting.ca/postgres/" is incorrect. Link is broken (yields 404 page; looks like domain wasn't renewed a ...more...
|
B1.6
04-Oct-08
|
|
| 44 |
|
#35952: In Ubuntu 8.04 (Hardy) the gems directory is not part of the path. In 8.04, gems are located in /var/lib/gems/1.8/bin Just add that your path (probably in /etc/profile) and source it. --Stephen Cuzzort #35952: In Ubuntu 8.04 (Hardy) the gems directory is not part of the path. In 8.04, gems are located in /var/lib/gems/1.8/bin Just add that your path ...more...
|
B1.6
17-Nov-08
|
|
| 48 |
|
#32023: I also got the above - When I run it: "Routing Error No route matches "/say/hello" with {:method=>:get}"
I had to restart mongrel to get the correct browser display.
OS X 10.4.11 with uptodate rails (2.0.2) per pg 35--rick Strang #32023: I also got the above - When I run it: "Routing Error No route matches "/say/hello" with {:method=>:get}"
I had to restart mongrel to get th ...more...
|
B1.1
16-May-08
|
|
| 50 |
|
#36112: When I edited the comntroller to add the say action and saved the file then refereshed my webpage I got an error 'unable to find the path' I killed and restarted the webrick server and it worked perfectly.
I am using the InstantRails install on windows XP.--Wayne Andersen #36112: When I edited the comntroller to add the say action and saved the file then refereshed my webpage I got an error 'unable to find the path' I k ...more...
|
B1.6
25-Nov-08
|
|
| 50 |
|
#34642: The demo example doesn`t work, since there is no database table!
Okay, i did not exactly follow the guide... i am using Aptana... but this mistake should occure anyway.
greeting, Chris--Christoph Ossner #34642: The demo example doesn`t work, since there is no database table!
Okay, i did not exactly follow the guide... i am using Aptana... but this mi ...more...
|
B1.6
26-Sep-08
|
|
| 52 |
|
#35931: In your whirlwind intro to ERb, the one thing that is missing is the comment syntax, <%# %> . Any programmer is going to want to add comments, but I (eventually) ran into a somewhat difficult to track down problem using what seemed the obvious solution to me: just putting a Ruby comment within <% %> (I think I was crashing the Ruby interpreter, but instead of getting an error message, the output just disappeared). Anyway, my suggestion is to mention that you can add comments with <%# %> and that <% # %> is considered an ERb syntax error.--James Nachbar #35931: In your whirlwind intro to ERb, the one thing that is missing is the comment syntax, <%# %> . Any programmer is going to want to add comment ...more...
|
B1.6
16-Nov-08
|
|
| 52 |
|
#35298: Say hello demo does not work. There is no route to the resource hello as it is not one of the standard REST actions.
I get the following error:
Routing Error
No route matches "/say/hello" with {:method=>:get}
I have resolved this by adding the following line to routes.rb:
map.resources :say, :collection => { :hello => :get }
Regards. Vicente Bosch--Vicente Bosch Campos #35298: Say hello demo does not work. There is no route to the resource hello as it is not one of the standard REST actions.
I get the following er ...more...
|
B1.6
16-Oct-08
|
|
| 54 |
|
#36109: After
<% 3.times do -%>
Ho!<br />
<% end %>
Merry Christmas!
The output isn't:
Ho!<br />
Ho!<br />
Ho!<br />
Merry Christmas
Because it wouldn't show the breaks--Brett Goulder #36109: After
<% 3.times do -%>
Ho!<br />
<% end %>
Merry Christmas!
The output isn't:
Ho!<br />
Ho!<br />
Ho!<br />
Merry Christmas
...more...
|
B1.6
24-Nov-08
|
|
| 54 |
|
#34574: The word 'whitespace' is improperly hyphenated and broken across lines 4-5 as 'whites-pace'.--John Goetz
|
B1.5
20-Sep-08
|
|
| 54 |
|
#34807: On the Second paragraph on the first line there is the sentence: "Normally, this doesn't matter, because HTML..."
The end of the line is ends up with "white-" and the next line have "pace.", it should be "white-space" and not "white-pace".--Ido Kanner #34807: On the Second paragraph on the first line there is the sentence: "Normally, this doesn't matter, because HTML..."
The end of the line is en ...more...
|
B1.6
04-Oct-08
|
|
| 68 |
|
#35415: The paragraph is as follows:
you can now skip forward to (((Section 6.1, Create the Products Database and Maintenance Application))), on page 73.
There is NO section with this title, as the mentioned title is PART of section "6.1".
Thanks.--Abder-Rahman Hasan Ali #35415: The paragraph is as follows:
you can now skip forward to (((Section 6.1, Create the Products Database and Maintenance Application))), on pa ...more...
|
B1.6
23-Oct-08
|
|
| 69 |
|
#35808: In the General Recovery Advice box the sentence 'then everything should work described.' would read better as 'then everything should work as described.'--Iain Daniel Watt #35808: In the General Recovery Advice box the sentence 'then everything should work described.' would read better as 'then everything should work as ...more...
|
B1.6
11-Nov-08
|
|
| 69 |
|
#35043: "Typos happen to the best of us and side explorations
are not only are possible, they are positively encouraged." Should read "side explorations are not only possible, "?--Eric Dau #35043: "Typos happen to the best of us and side explorations
are not only are possible, they are positively encouraged." Should read "side explorat ...more...
|
B1.6
09-Oct-08
|
|
| 75 |
|
#33022: In the commandline examples: It is sometimes hard to distinguish what is to be typed and what is actually output from the commandline (especially with line wraps). I suggest to clear this that a different colour or bold is used for the command itself.--Egil Helland #33022: In the commandline examples: It is sometimes hard to distinguish what is to be typed and what is actually output from the commandline (especia ...more...
|
B1.3
11-Jul-08
|
|
| 77 |
|
#35354: in the command at the top of the page, the '>' for the second line confuses windows folks; I included the '>' in the command and the scaffold worked, just skipped creating the title attribute. Any chance that second prompt could look like 'depot>'; would be clear what is going on.--Ben Burbridge #35354: in the command at the top of the page, the '>' for the second line confuses windows folks; I included the '>' in the command and the scaffold ...more...
|
B1.6
19-Oct-08
|
|
| 77 |
|
#34436: In the first code listing on this page, it is difficult to distinguish between the user's command and the resulting output. Use of color and bolding, such as in the listing on the bottom of the page, should help this.
--Wyatt Greene #34436: In the first code listing on this page, it is difficult to distinguish between the user's command and the resulting output. Use of color and ...more...
|
B1.5
07-Sep-08
|
|
| 78 |
|
#35028: Page 69 states
A few "magic" commands worth knowing, explained in detail later: rake
db:sessions:clear and rake db:migrate VERSION=0.
Page 77 states
And that’s it. Rake looks for all the migrations not yet applied to the database
Page 78 states
and applies them. In our case, the products table is added to the database
defined by the development: section of the database.yml file.7
7. If you’re feeling frisky, you can experiment with rolling back the migration. Just type
depot>rake db:migrate VERSION=0
Shouldn't there be a caveat here about the order of the timestamps does matter, if one
does a db:migrate VERSION=0
followed by a
db:migrate
if I use
1) my own 20090601000002 AddPriceToProduct: which says 2009 rather than 2008
(the db:migrate will work as you have stated)
2) Your book file db/migrate/20080601000003_add_test_data.rb
(the db:migrate will work as you have stated)
However,
when I then do a
db:migrate VERSION=0
followed by a db:migrate
then
add_test_data will be run before addPriceToProduct,
so add_test_data will fail because the price column isn't there.
--Jim Oser #35028: Page 69 states
A few "magic" commands worth knowing, explained in detail later: rake
db:sessions:clear and rake db:migrate VERSION=0.
Pag ...more...
|
B1.6
08-Oct-08
|
|
| 80 |
|
#36128: On my computer using the InstantRails install it does not give me a time stamp it just numbers the migrations 001 002 003. So the discussion about the timestamp should either be modified or removed.--Powertoaster #36128: On my computer using the InstantRails install it does not give me a time stamp it just numbers the migrations 001 002 003. So the discussion a ...more...
|
B1.6
25-Nov-08
|
|
| 80 |
|
#35372: Chapter 6, Footnote 10: "preceeding" should be "preceding".--Morris Keesan
|
B1.6
20-Oct-08
|
|
| 80 |
|
#35281: Code example typo:
....add when it adds columns to an existing table.
depot> ruby script/generate migration add_price_to_product price:decimal
exists db/migrate
create db/migrate/20080601000002_add_price_to_product.rb
Notice how the generated file has a UTC based timestamp...
First line of code has a space missing between the migration name and symbol. Should read:
depot> ruby script/generate migration add_price_to_product price :decimal--Daniel Turner #35281: Code example typo:
....add when it adds columns to an existing table.
depot> ruby script/generate migration add_price_to_product price:d ...more...
|
B1.6
15-Oct-08
|
|
| 87 |
|
#31952: In the self.up method, the text "foundational piece of any project's" appears to be italic, which would be odd as this is part of the code listing.--Dave Roberts
|
B1.0
08-May-08
|
|
| 88 |
|
#35801: in the code for price_must_be_at_least_a_cent where it says price < 0.01 - it needs to be price.to_f < 0.01 because of error with comparing string to float. This was with rails 2.1.2 #35801: in the code for price_must_be_at_least_a_cent where it says price < 0.01 - it needs to be price.to_f < 0.01 because of error with comparing st ...more...
|
B1.6
11-Nov-08
|
|
| 88 |
|
#34285: The footnote on this page flows over to the next page's footnotes.--Zach Langley
|
B1.5
28-Aug-08
|
|
| 89 |
|
#32577: The migration code contained this assignment to image_url:
:image_url => '/images/svn.jpg' ,
when I run the example, the generated html did not render an image. The source reveals that the images directory is doubled up:
<td>
<img alt="Svn" class="list-image" src="/images/images/svn.jpg" />
</td>
If I change the migration code to:
:image_url => 'svn.jpg',
everything works and the image appears in the browser.
Note that I am totally new to rails, and pretty new to ruby. What I know about rails ends pretty much on page 89 of your book. Also, I am running on windows using cygwin, ruby version 1.8.7, and rails 2.1.
H^2--Harold Howe #32577: The migration code contained this assignment to image_url:
:image_url => '/images/svn.jpg' ,
when I run the example, the generated html ...more...
|
B1.3
01-Jul-08
|
|
| 89 |
|
#35917: The footnote on the bottom of page 89 is a carry over from page 88 and starting is mid thought which is confusing to the reader.--Dale Noll
|
B1.6
15-Nov-08
|
|
| 91 |
|
#35999: In the code listing for class AddTestData, there is a string delimited by %{ }. This string is not oblique like other strings in the code listing, except for the characters 's a foundational piece of any project' which happen to be between single quotes.--Jim Balhoff #35999: In the code listing for class AddTestData, there is a string delimited by %{ }. This string is not oblique like other strings in the code lis ...more...
|
B1.6
19-Nov-08
|
|
| 91 |
|
#36089: delete 'scaffold' from the line
<%= stylesheet_link_tag 'scaffold', 'depot' %>
in the products.html.erb code snippet. Correct is
<%= stylesheet_link_tag 'depot' %>
The book says to add 'depot', but no mention of deleting 'scaffold'. When you keep 'scaffold' in there, the page does not reflect the new css, and instead looks really bland (no cycling css, no dotted underline, etc.)--J Goldstein #36089: delete 'scaffold' from the line
<%= stylesheet_link_tag 'scaffold', 'depot' %>
in the products.html.erb code snippet. Correct is
<%= st ...more...
|
B1.6
23-Nov-08
|
|
| 94 |
|
#35392: Text states that "we created a depot.css stylesheet" but all that was done on previous pages was to add a reference to the depot stylesheet on the products layout page. There is nothing to show the actual creation of the depot.css stylesheet.--Bill Colvin #35392: Text states that "we created a depot.css stylesheet" but all that was done on previous pages was to add a reference to the depot stylesheet on ...more...
|
B1.6
22-Oct-08
|
|
| 96 |
|
#32420: after adding the storecontroller, i received an error "No route matches "/login/index" with {:method=>:get}".
restarting mongrel cleared the problem.
might be providing this as a hint.
why do i need to restart mongrel is a secondary question that the authors might like to shed some light on.
i am running 2.0--mike h #32420: after adding the storecontroller, i received an error "No route matches "/login/index" with {:method=>:get}".
restarting mongrel cleared t ...more...
|
B1.3
19-Jun-08
|
|
| 97 |
|
#35800: After creating the storecontroller you might want to mention for them to restart webrick so the updates for the new route get picked up. --jeff mikres
|
B1.6
11-Nov-08
|
|
| 98 |
|
#31916: The background colour of logo.png doesn't match the css colour of the header. In the screenshot it looks like it should. Trivial, I know :)--Antony Blakey
|
B1.0
07-May-08
|
|
| 98 |
|
#35001: Typesetting software is producing ligatures in the text - it's fine for the most part, but when I copy+pasted "find_products_for_sale" in the second line, the initial fi ligature caused some "issues" with the Ruby interpreter until I took a closer look at the code...relatively easy to spot if you're using a monospaced font (doesn't everyone?)
It's not a huge deal, but perhaps something that might be looked at?--Mark Glossop #35001: Typesetting software is producing ligatures in the text - it's fine for the most part, but when I copy+pasted "find_products_for_sale" in the s ...more...
|
B1.6
07-Oct-08
|
|
|
101 |
#34865: The styles shown in that page are not for the task 7.2 (Add a Page layout). I believe it's for the Cart layout.
--Steven Tan
|
B1.6
05-Oct-08
|
|
| 101 |
|
#34929: The stylesheet modifications at the end of section 7.2 don't have anything to do with the output of the main "store" page. All the needed styles are already in the previously referenced stylesheet.--Phil MacGovern #34929: The stylesheet modifications at the end of section 7.2 don't have anything to do with the output of the main "store" page. All the needed styl ...more...
|
B1.6
06-Oct-08
|
|
| 102 |
|
#34930: Minor point: The styling of the page is such that the price of the last entry in the catalog (Pragmatic Version Control) doesn't clear the picture when the page is very wide (I am using 1680x1050). Adding a 'br clear="left"' tag fixes this, but adds unneeded space...--Phil MacGovern #34930: Minor point: The styling of the page is such that the price of the last entry in the catalog (Pragmatic Version Control) doesn't clear the pic ...more...
|
B1.6
06-Oct-08
|
|
| 104 |
|
#35728: We're working away at putting a button on the page, then instructed to put an action in that won't work - "So, that’s what we will have to fix next." Then the chapter ends!! We've been told that the page won't work and then given exercises! How much better to exclude the action & product id, viz <%= button_to "Add to Cart" %> & amend the text that followed to:
"Now our index page looks like Figure 7.3. Of course, if you push the button now nothing will happen because the button has no action associated with it. So, that’s what we will have to fix next."
The caption to figure 7.3 will be accurate as well!! The action can be entered in the following chapter.
Well it seems logical to me!--Steve Poole #35728: We're working away at putting a button on the page, then instructed to put an action in that won't work - "So, that’s what we will have to fix ...more...
|
B1.6
09-Nov-08
|
|
| 104 |
|
#33976: The examples given for the number_to_currency helper method show corresponding example outputs. However, the chosen indicator, "=>", which directs readers attention to the ouput, is the same as one of the operands in the code. Essentially there are too many "=>" symbols. --Philip Ronald Dutton #33976: The examples given for the number_to_currency helper method show corresponding example outputs. However, the chosen indicator, "=>", which di ...more...
|
B1.4
13-Aug-08
|
|
| 107 |
|
#35788: the user will get very confused as items appear
and disappear in their cart across requests. (I think it should be "users"; the plural, because it is also "their" cart; or have I msunderstood something); best regards--Andreas Ludewig #35788: the user will get very confused as items appear
and disappear in their cart across requests. (I think it should be "users"; the plural, beca ...more...
|
B1.6
11-Nov-08
|
|
| 108 |
|
#32678: After adding the cart and cookies to the application, I started getting "ActionController::InvalidAuthenticityToken" error messages whenever I tried to add a book to the cart. I resolved this by adding "protect_from_forgery :only => [:create, :update, :destroy]" to the top of the store_controller.rb file.--Frank Luke #32678: After adding the cart and cookies to the application, I started getting "ActionController::InvalidAuthenticityToken" error messages whenever I ...more...
|
B1.3
07-Jul-08
|
|
| 109 |
|
#35253: In application.rb we are told to add the following:
session :session_key => '_depot_session_id'
however in the environment.rb file created the session_key is '_depot_session' -- these two have to match so one or the other needs to be changed.--Rich #35253: In application.rb we are told to add the following:
session :session_key => '_depot_session_id'
however in the environment.rb file creat ...more...
|
B1.6
15-Oct-08
|
|
| 110 |
|
#31958: It's possible to get a rather hard to find error if you leave off the parenthesis on the else clause in add_product (@items << CartItem.new(product) ). I left them off (was trying to further the habit of not using parenthesis all the time in Ruby) and this causes the following error:
<path>/rails/depot/app/models/cart.rb:13: syntax error, unexpected tIDENTIFIER, expecting kEND
I'm guessing that the issues is that without the parenthesis the binding gets messed up. Might be worth mentioning, as it took me quite a while to figure out what I had messed up... after the fix, the server might need to be restarted and the sessions cleared too (I had to do this the first time, but oddly enough, not after trying to replicate the error).--David Kapp #31958: It's possible to get a rather hard to find error if you leave off the parenthesis on the else clause in add_product (@items << CartItem.new(pr ...more...
|
B1.0
09-May-08
|
|
| 110 |
|
#31960: I got a 'uninitialized constant Cart::CartItem)' error, which took me quite a while to figure out. It was obviously a class loading problem, but I couldn't figure out why. Turns out I had put my CartItem class in a file called CartItem.rb, rather than cart_item.rb.
This is the first place that this error might occur in the book, so I think a callout might be a good idea.--Antony Blakey #31960: I got a 'uninitialized constant Cart::CartItem)' error, which took me quite a while to figure out. It was obviously a class loading problem, b ...more...
|
B1.0
09-May-08
|
|
| 111 |
|
#34936: Since later in the book (p118) you are swapping the order the calls to find_cart and Product.find (lines 2 and 3 of store_controller.rb), it is a little clearer to swap their order here, so that it is clearer on p118 what changes--Phil MacGovern #34936: Since later in the book (p118) you are swapping the order the calls to find_cart and Product.find (lines 2 and 3 of store_controller.rb), it i ...more...
|
B1.6
06-Oct-08
|
|
| 111 |
|
#32450: protect_from_forgery :only => [:create, :update, :destroy]
Should sort it. Books needs to mention this.--Adam Craven
|
B1.3
24-Jun-08
|
|
| 111 |
|
#35020: Possible error (I'm just learning)--my cart would not update and it would only add one item. I'd return to the store, add another and only the newly added item would be there. The session was not updated. This was corrected with the line
session[:cart] = @cart
added before the end of the add_to_cart method. (I am using mySQL instead of SQLite3, so maybe in SQLite this updates automatically? Where is the session actually set to our cart? The other way happens in the find_cart method called in add_to_cart, but don't we need to update the session's cart?) --Rachel #35020: Possible error (I'm just learning)--my cart would not update and it would only add one item. I'd return to the store, add another and only the ...more...
|
B1.6
08-Oct-08
|
|
| 113 |
|
#34935: Some explanation of this syntax would be helpful:
current_item = @items.find {|item| item.product == product}--Phil MacGovern
|
B1.6
06-Oct-08
|
|
| 116 |
|
#35395: Text states "exception at line 16"; however, a close look at your figure 8.2 on the next page indicates it is line 10.
--Bill Colvin
|
B1.6
22-Oct-08
|
|
| 116 |
|
#34934: "show her the result of our morning's work." - according to the story you are spinning, it is after lunch and you have made these changes in the afternoon. Perhaps "day's work"?--Phil MacGovern #34934: "show her the result of our morning's work." - according to the story you are spinning, it is after lunch and you have made these changes in t ...more...
|
B1.6
06-Oct-08
|
|
| 116 |
|
#34190: On pages 116-118, exceptions are said several (I noticed seven) times to be 'thrown' rather than 'raised'. Other languages use this terminology all the time, but the Pickaxe book makes a distinction between 'raising' exceptions (handled with 'rescue') and 'throwing' symbols (handled with 'catch').
I'm not sure if the two are interchangeable (eg you can rescue something that you throw, or catch something that you raise) but it would seem more consistent with the pickaxe book if these uses of 'throw' (or 'throws', 'thrown' etc) were changed to 'raise'.--Charlie O'Keefe #34190: On pages 116-118, exceptions are said several (I noticed seven) times to be 'thrown' rather than 'raised'. Other languages use this terminolog ...more...
|
B1.5
22-Aug-08
|
|
| 122 |
|
#34614: This may be a suggestion, who knows. During the example of adding the total price to the Depot cart the example image shows a formatted Total cell along with a formatted individual item price cell. The used css tags are item-price and total-cell neither of which are defined in the depot.css currently available. Copy & Pasted from the URL provided in the eBook on September 23, 2008. In all other cases where new CSS was introduced a code block was included with the additional css but it appears to be missing in this example.
Hope I didn't miss something.--Matt Stuart #34614: This may be a suggestion, who knows. During the example of adding the total price to the Depot cart the example image shows a formatted Total ...more...
|
B1.5
23-Sep-08
|
|
| 122 |
|
#34937: The method name of "redirect_to_index" is perhaps a little misleading; it doesn't take into account the flash. Perhaps call is "flash_and_redirect_to_index". A little long, I admit.--Phil MacGovern #34937: The method name of "redirect_to_index" is perhaps a little misleading; it doesn't take into account the flash. Perhaps call is "flash_and_redi ...more...
|
B1.6
06-Oct-08
|
|
| 122 |
|
#35051: in "<% for cart_item in @cart.items %>"
cart_item is different from the previously used
"<% for item in @cart.items %>"
It would avoid confusion to continue to use the previous "item" version instead of "cart_item". It is also more logic.--Giuseppe Caruso #35051: in "<% for cart_item in @cart.items %>"
cart_item is different from the previously used
"<% for item in @cart.items %>"
It would avoid conf ...more...
|
B1.6
09-Oct-08
|
|
| 123 |
|
#35114: The total price should be calculated like this:
def total_price
@items.sum { |item| item.price * item.quantity}
end
--Erik Bakke
|
B1.6
11-Oct-08
|
|
| 123 |
|
#34938: Inconsistent use of parentheses: <td><%= h(cart_item.title) %></td>
Never before had you used () with "h"--Phil MacGovern
|
B1.6
06-Oct-08
|
|
| 123 |
|
#35798: There is no error in total_price, but rather in our (the user's) code for CartItem.price; CartItem.price should return the cost of the item times the quantity. (See page 113.)--Robert Kosek #35798: There is no error in total_price, but rather in our (the user's) code for CartItem.price; CartItem.price should return the cost of the item ti ...more...
|
B1.6
11-Nov-08
|
|
| 130 |
|
#34221: end statement from previous code block has become separated by figure 9.1--Alan
|
B1.5
24-Aug-08
|
|
| 131 |
|
#33538: For reasons I can't understand at all, with Rails 2.1, my shopping cart in the sidebar was not getting refreshed until I *removed* the
respond_to { |format| format.js }
line from the end of my StoreController.add_to_cart method. After that, my add_to_cart.js.rjs worked fine. ?????
--Paul Holbrook #33538: For reasons I can't understand at all, with Rails 2.1, my shopping cart in the sidebar was not getting refreshed until I *removed* the
res ...more...
|
B1.3
04-Aug-08
|
|
| 133 |
|
#36038: one more thing that can prevent the AJAX from working: when I saved add_to_cart.js.rjs in UTF-8/DOS mode (UltraEdit on Windows), it wouldn't work. I had to save in in ASCII.--Phil MacGovern #36038: one more thing that can prevent the AJAX from working: when I saved add_to_cart.js.rjs in UTF-8/DOS mode (UltraEdit on Windows), it wouldn't w ...more...
|
B1.6
21-Nov-08
|
|
| 136 |
|
#35161: <p>Having completed Iteration D3 everything works fine as long as there are already products in the cart. But if I empty the cart and add a book to the cart, I get the following error:</p>
<p>RJS error: TypeError: $("current_item") is null</p>
<p>I next get a longer error message:</p>
<p>Element.update("cart", "<div class=\"cart-title\">Your Cart</div>\n<table>\n \n <tr>\n\n <td>1×</td>\n <td>Pragmatic Project Automation</td>\n <td class=\"item-price\">$29.95</td>\n</tr>\n \n <tr class \"total-line\">\n <td colspan=\"2\">Total</td>\n <td class=\"total-cell\">$29.95</td>\n </tr>\n \n</table>\n\n<form method=\"post\" action=\"/store/empty_cart\" class=\"button-to\"><div><input type=\"submit\" value=\"Empty cart\" /><input name=\"authenticity_token\" type=\"hidden\" value=\"82ea2cc4d7a7a42e0e8b976f214e35362c0bb4be\" /></div></form>");
$("current_item").visualEffect("highlight", {"endcolor": "#114411", "startcolor": "#88ff88"});</p>
<p>The cart then updates, but without highlighting the change. If I add another copy of the same item, everything work as expected again.</p>--BEK c/o Trond Lossius #35161: <p>Having completed Iteration D3 everything works fine as long as there are already products in the cart. But if I empty the cart and add a bo ...more...
|
B1.6
12-Oct-08
|
|
| 136 |
|
#36036: Just a heads up, using Aptana 1.2 the fade code doesn't seem to play nice. It works in IE 7 and Firefox 3.0.4 fine outside the IDE, but inside it throws an error. When the store page is first loaded IE in the integrated preview inside Aptana give a runtime error with Line: 335 / Error: 'Autocompleter.Base.prototype.getTokenBounds' is null or not an object.
If you hit No, the page loads fine, however the new fade gives an RJS error: [object Error] when you try and add an item to the cart. Again, this doesn't occur outside Aptana, but in the event anyone is using it I figured I'd report it.--Josh #36036: Just a heads up, using Aptana 1.2 the fade code doesn't seem to play nice. It works in IE 7 and Firefox 3.0.4 fine outside the IDE, but insid ...more...
|
B1.6
20-Nov-08
|
|
| 140 |
|
#34624: The last sentence, in which you state that "making our application work regardless of whether JavaScript is enabled takes just a two line of code change in the add_to_cart action," is awkward. Perhaps the following would be better: ". . . enabled requires just two lines of code in the add_to_cart action."--Jeff Springman #34624: The last sentence, in which you state that "making our application work regardless of whether JavaScript is enabled takes just a two line of c ...more...
|
B1.6
24-Sep-08
|
|
| 142 |
|
#35198: hxxp://pragprog.wikidot.com/rails-play-time - doesn't contain reference/discussion for first bullet point in "Playtime" for Task D.
[Yes I know it's a wiki and I could get an account...meh.]--Mark Glossop #35198: hxxp://pragprog.wikidot.com/rails-play-time - doesn't contain reference/discussion for first bullet point in "Playtime" for Task D.
[Yes I ...more...
|
B1.6
13-Oct-08
|
|
| 142 |
|
#34951: Line 7 - "Others finds it useful" should be "Others find it useful"
--Phil MacGovern
|
B1.6
07-Oct-08
|
|
| 145 |
|
#35037: The link to Tobias Lütke’s ActiveMerchant library is not correct. This seems to be better: www.activemerchant.org
|
B1.6
09-Oct-08
|
|
| 145 |
|
#35038: Payment module∗seems to be dead -> discussion seemst to indicate that people should use ActiveMerchant instead. Suggest to kill reference here.
|
B1.6
09-Oct-08
|
|
| 147 |
|
#34630: Hi, You have the following code snippets at the top of this page.
<%= button_to "Checkout" , :action => :checkout %>
<%= button_to "Empty cart" , :action => :empty_cart %>
The second is the line of code to be added but the first reflects the code before the ajax changes have been applied and actually looks like this
<% form_remote_tag :url => { :action => :empty_cart } do %>
<%= submit_tag "Empty cart" %>
This raises questions over which format should be used at this point for the check out button.
Hope this helps.
James--James West #34630: Hi, You have the following code snippets at the top of this page.
<%= button_to "Checkout" , :action => :checkout %>
<%= button_to "Empty ca ...more...
|
B1.6
25-Sep-08
|
|
| 147 |
|
#34631: "Maybe we want to edit an existing model"
Should that read
"Maybe we want to edit an existing order"--James West
|
B1.6
25-Sep-08
|
|
| 147 |
|
#34673: "As it stands, that’s not particularly interesting: because it’s a new model, all the fields will be empty. However, consider the general case. Maybe we want to edit an existing model."
I think you're using the word "model" where the word "order" (an instance of the order model) would be more clear. (Similarly, in the next sentence you say "tried to enter an order", and I think that's right.) Suggest:
"As it stands, that’s not particularly interesting: because it’s a new order, all the fields in the model will be empty. However, consider the general case. Maybe we want to edit an existing order."--Brent J. Nordquist #34673: "As it stands, that’s not particularly interesting: because it’s a new model, all the fields will be empty. However, consider the general case. ...more...
|
B1.6
29-Sep-08
|
|
| 151 |
|
#35841: The CSS breaks a bit here. Only inputs get the margin, and selects and text areas aren't inputs (for styling anyway). It should rightly be:
.depot-form input, .depot-form select, .depot-form textarea {
margin-left: 0.5em;
}--Robert Kosek #35841: The CSS breaks a bit here. Only inputs get the margin, and selects and text areas aren't inputs (for styling anyway). It should rightly be: ...more...
|
B1.6
12-Nov-08
|
|
| 152 |
|
#35238: In footnote 5, the text "because an application _can’t_ assume" should be "because an application _shouldn’t_ assume".
We all know of applications that _do_ assume, so "can't" isn't correct: "shouldn't" is more appropriate.--Mark Glossop #35238: In footnote 5, the text "because an application _can’t_ assume" should be "because an application _shouldn’t_ assume".
We all know of appli ...more...
|
B1.6
14-Oct-08
|
|
| 153 |
|
#35239: Directing readers to follow ("On line 3...", "on line 5...") a code snippet that is interrupted by 2 footnotes, a page break and a "Joe Asks..."? Probably not the smartest layout...
[If it wasn't obvious, my suggestion is to arrange the text such that the code isn't broken up at all.]--Mark Glossop #35239: Directing readers to follow ("On line 3...", "on line 5...") a code snippet that is interrupted by 2 footnotes, a page break and a "Joe Asks.. ...more...
|
B1.6
14-Oct-08
|
|
| 157 |
|
#35869: the code for add_to_cart.js.rjs is missing the > to show that only the first line needs to be added to the code--Farhan Thawar
|
B1.6
13-Nov-08
|
|
| 161 |
|
#35436: Pretty minor but "and then run an SHA1 digest on the result" should be "and then run a SHA1 digest on the result".
The former would be OK if people spelled the letters 'S' 'H' 'A' individually when encountering SHA1, but it is typically said as 'shaw one' which would make "a" more appropriate.
--Bill Colvin #35436: Pretty minor but "and then run an SHA1 digest on the result" should be "and then run a SHA1 digest on the result".
The former would be OK i ...more...
|
B1.6
24-Oct-08
|
|
| 161 |
|
#35041: In the explanation of why we use 'self.salt = ....' it says: "... Without the self., Ruby would
have thought we were assigning to a local variable, and our code would have no effect. "
That is pretty clear, what is NOT so clear is, why is the writer not using '@salt = ...'? After looking at the example several times I am still not sure whether those two are equivalant in this case.--Reuben Sivan #35041: In the explanation of why we use 'self.salt = ....' it says: "... Without the self., Ruby would
have thought we were assigning to a local v ...more...
|
B1.6
09-Oct-08
|
|
| 163 |
|
#35019: I had omitted the "require 'digest/sha1'" from my User model and got all the way up to successfully login in before I noticed. Does it really need to be there?--Phil #35019: I had omitted the "require 'digest/sha1'" from my User model and got all the way up to successfully login in before I noticed. Does it really ...more...
|
B1.6
08-Oct-08
|
|
| 166 |
|
#34233: Code sample appears truncated
<td><%= link_to 'Destroy', user, :confirm => 'Are you sure?', :method => :delet...*TRUNC*--Reuben Sivan
|
B1.5
25-Aug-08
|
|
| 167 |
|
#35588: There is a problem with the style sheet and the error flash.
If no user name is entered and the form is submitted the layout jumps all over the place trying to display the red borders and highlights.
Name: Field
Becomes
Name
:
Field
I can only assume that this is a CSS error--James West #35588: There is a problem with the style sheet and the error flash.
If no user name is entered and the form is submitted the layout jumps all over ...more...
|
B1.6
03-Nov-08
|
|
| 167 |
|
#34206: Adding a user did not work for me until I restarted my server. I don't know why. Is RESTful routing not correctly generated until the server restarts? This is a very confusing issue. --David Lyon #34206: Adding a user did not work for me until I restarted my server. I don't know why. Is RESTful routing not correctly generated until the server ...more...
|
B1.5
23-Aug-08
|
|
| 167 |
|
#35559: My users/new page works, but does not look like the screenshot. Was the depot.css updated?
Also, changing app/views/users/edit.html.erb was not discussed. It still has the Hashed password and Salt fields from the scaffold.--Jason Noble #35559: My users/new page works, but does not look like the screenshot. Was the depot.css updated?
Also, changing app/views/users/edit.html.erb wa ...more...
|
B1.6
31-Oct-08
|
|
| 168 |
|
#36123: seem to be switching back and forth between 'redirect_to(:action=>:index)' (p165) and 'redirect_to(:action=>"index")' (p168).
Be consistent. (or need to explain that they need the same thing)--Phil MacGovern #36123: seem to be switching back and forth between 'redirect_to(:action=>:index)' (p165) and 'redirect_to(:action=>"index")' (p168).
Be consisten ...more...
|
B1.6
25-Nov-08
|
|
| 169 |
|
#34499: depot_p/app/views/admin/login.html.erb
Bug: When attempting to log in without correct user-id/password, no errors are displayed.
Solution: Add line containing flash[:notice], or some better formatted error messages.
This solution is from a newbie. It would be nice to be nicely formatted like earlier in the book.
<div class="depot-form">
<%= flash[:notice] %> <!-- This line or equivalent needed to display error messages -->
<% form_tag do %>--William Steinberg #34499: depot_p/app/views/admin/login.html.erb
Bug: When attempting to log in without correct user-id/password, no errors are displayed.
Solutio ...more...
|
B1.5
14-Sep-08
|
|
| 170 |
|
#33034: When I got to this page and looked at the nice login form in figure 11.1, then compared it to the completely plain one in my application, I realized that we never made an admin layout. Maybe that should have been obvious, but I missed it. Just copying the users layout and editing it seemed to do the trick.--Shane Walker #33034: When I got to this page and looked at the nice login form in figure 11.1, then compared it to the completely plain one in my application, I re ...more...
|
B1.3
12-Jul-08
|
|
| 170 |
|
#33965: I had to do a "mongrel_rails restart" after adding admin controller. Was getting "No controller responded to.. etc.." when trying to view /admin. Guessing there's some caching problem with mongrel -- might want to add a note that a restart may be required. #33965: I had to do a "mongrel_rails restart" after adding admin controller. Was getting "No controller responded to.. etc.." when trying to view /ad ...more...
|
B1.4
13-Aug-08
|
|
| 171 |
|
#34315: I had to restart my server after adding the admin controller, I didn't notice you mention that.--Wesley Tarle
|
B1.5
01-Sep-08
|
|
| 173 |
|
#34004: After rake:db:sessions:clear when using MySQL the app breaks.
Mysql::Error: Lost connection to MySQL server during query: SELECT * FROM `sessions`
It's fixed by restarting the app server.--Rory OConnell #34004: After rake:db:sessions:clear when using MySQL the app breaks.
Mysql::Error: Lost connection to MySQL server during query: SELECT * FROM ` ...more...
|
B1.4
14-Aug-08
|
|
| 174 |
|
#35286: Why don't you remove app/views/layouts/order.html.erb like as product.html.erb and user.html.erb file?
You generated order by call scaffold, it made app/views/layouts/order.html.erb file automatically. When the layout file exist, he nice global layout isn't applied to screen even I click order link on side panel.
I use rails 2.1.1 in Ubuntu 8.10.
thanks.--JinYoung,Heo #35286: Why don't you remove app/views/layouts/order.html.erb like as product.html.erb and user.html.erb file?
You generated order by call scaffold ...more...
|
B1.6
16-Oct-08
|
|
| 174 |
|
#35050: at the beginning of 11.4 we add layout "store" and are told to visit 'admin', and only later the text mentions the need to remove references to cart.
That should be done before attempting to visit the said urls--Reuben Sivan #35050: at the beginning of 11.4 we add layout "store" and are told to visit 'admin', and only later the text mentions the need to remove references t ...more...
|
B1.6
09-Oct-08
|
|
| 175 |
|
#34248: Shouldn't it be "<%= link_to 'Orders', :controller => 'admin' %>" rather than "<%= link_to 'Orders', :controller => 'orders' %>" ?
(Same says: Next beta will generate the orders controller)--brocoli #34248: Shouldn't it be "<%= link_to 'Orders', :controller => 'admin' %>" rather than "<%= link_to 'Orders', :controller => 'orders' %>" ?
(Same sa ...more...
|
B1.5
26-Aug-08
|
|
| 179 |
|
#35022: Re: "We created a virtual attribute representing the plain-text password and coded it to create the hashed version whenever the plain-text version is updated"
The word "updated" is incorrect - we never addressed the 'edit' action upon users, so it is currently impossible to "update" a user. The sentence needs to be re-written to be more correct.--Phil #35022: Re: "We created a virtual attribute representing the plain-text password and coded it to create the hashed version whenever the plain-text ver ...more...
|
B1.6
08-Oct-08
|
|
| 179 |
|
#35023: Re second bullet point about GET/POST differences. I'm sorry, I went over it twice and can't see a thing relating to this. We updated the 'update' action to redirect to the index, but other than that...--Phil #35023: Re second bullet point about GET/POST differences. I'm sorry, I went over it twice and can't see a thing relating to this. We updated the 'upd ...more...
|
B1.6
08-Oct-08
|
|
| 180 |
|
#35541: When I issued the command "prd = Product.new" at the script/console the output I saw was:
#<Product id: nil, title: nil, description: nil, image_url: nil, created_at: nil, updated_at: nil, price: nil>
Is this to be expected?
--Bill Colvin #35541: When I issued the command "prd = Product.new" at the script/console the output I saw was:
#<Product id: nil, title: nil, description: nil, ...more...
|
B1.6
30-Oct-08
|
|
| 181 |
|
#36000: Some junk characters seem to have gotten into the Task G title page:
"spam∧H∧H∧H∧Hmailing" in the first paragraph--Ryan Neufeld
|
B1.6
19-Nov-08
|
|
| 183 |
|
#35386: The generate script also produces a view file:
create app/views/info/who_bought.html.erb
[Running under Rails 2.1.1 - not sure when/if this changed or if it was just an omission from the text.]--Mark Glossop #35386: The generate script also produces a view file:
create app/views/info/who_bought.html.erb
[Running under Rails 2.1.1 - not sure when/if ...more...
|
B1.6
21-Oct-08
|
|
| 184 |
|
#36157: 'curl' and 'wget' are not available on Windows boxes, please provide alternatives--Phil MacGovern
|
B1.6
28-Nov-08
|
|
| 185 |
|
#34355: per previous comment, add the triangle to the
format.html
line that was added for the change that was just made.--Dave Colburn
|
B1.5
06-Sep-08
|
|
| 186 |
|
#35053: we never added product id 1, the example should use 2 (or 3 or 4)--Reuben Sivan
|
B1.6
09-Oct-08
|
|
| 188 |
|
#34678: Then we provide a template, which makes use not only of the generic XML
functionality that builder proviles,--Christoph Ossner
|
B1.6
30-Sep-08
|
|
| 188 |
|
#35481: functionality that builder proviles, but also
should read
functionality that builder provides, but also--Brian
|
B1.6
26-Oct-08
|
|
| 194 |
|
#34674: I think the list of files from "ls test/functional" may be out of date? In my depot directory at this point, I also have line_items_controller_test.rb and orders_controller_test.rb--Brent J. Nordquist #34674: I think the list of files from "ls test/functional" may be out of date? In my depot directory at this point, I also have line_items_controller ...more...
|
B1.6
29-Sep-08
|
|
| 197 |
|
#34278: On bottom of page, inside the following method:
bad.each do |name|
product = Product.new(:title => "My Book Title", :description => "yyy", :price ...*TRUNC*
:image_url => name)
assert !product.valid?, "saving #{name}"
end
...*TRUNC* should be replace with => 1
--Jean-Marie Schweizer #34278: On bottom of page, inside the following method:
bad.each do |name|
product = Product.new(:title => "My Book Title", :description => "yyy" ...more...
|
B1.5
27-Aug-08
|
|
| 198 |
|
#34955: the 2nd line of the 2nd loop for the test_image_url method is truncated. It's easy to figure out but I wonder why the previous loop had each parameter of the Product.new() call on a new line but the second loop does not. Previous pages / examples make no elusion to the idea that space is a concern in this book and I find it strange that it appears to be now.
--Matt Stuart--Matt Stuart #34955: the 2nd line of the 2nd loop for the test_image_url method is truncated. It's easy to figure out but I wonder why the previous loop had each p ...more...
|
B1.6
07-Oct-08
|
|
| 202 |
|
#34334: I found the placement of the code fragment (fig 13.1) at the top of this page (@@default_error_messages = ...) confusing, especially when it follows the sentence "The complete file now looks like this." I think the book would be clearer if it was moved closer to where it is relevant, or better separated from other pieces of code. #34334: I found the placement of the code fragment (fig 13.1) at the top of this page (@@default_error_messages = ...) confusing, especially when it f ...more...
|
B1.5
03-Sep-08
|
|
| 206 |
|
#34640: Agile Web Development with Rails 3nd Edition (Beta 1.3 - 20080604).pdf
Building an Application - Task F: Administration - Iteration F2: Logging In - Page 168
--------------------------------------------------------------------------------------
Create controller "admin", actions "login", "logout" and "index", by command
ruby script/generate controller admin login logout index
However,
Building an Application - Task T: Testing - Functional Testing of Controllers - Login - Page 206
------------------------------------------------------------------------------------------------
"Because the LoginController was created with the generate controller script, Rails
has a test stub waiting for us in the test/functional directory." (Download depot_r/test/functional/login_controller_test.rb)
I think,
the Controller should be AdminController rather than LoginController,
and the functional test file should be "admin_controller_test.rb" rather than
"login_controller_test.rb"
#34640: Agile Web Development with Rails 3nd Edition (Beta 1.3 - 20080604).pdf
Building an Application - Task F: Administration - Iteration F2: L ...more...
|
B1.3
26-Sep-08
|
|
| 210 |
|
#35483: "We have to remember to add the fixtures directive to the login controller test class. "
would be better stated as
"We have to remember to add the fixtures directive to the admin controller test class.
--Brian #35483: "We have to remember to add the fixtures directive to the login controller test class. "
would be better stated as
"We have to remember ...more...
|
B1.6
26-Oct-08
|
|
| 210 |
|
#35557: "an SHA1 hash value" should be "a SHA1 hash value".
--Bill Colvin
|
B1.6
31-Oct-08
|
|
| 223 |
|
#34675: At the end of the section on unit tests, "rake test:units" runs cleanly, and the same with the section on integration tests. But at the end of this section on functional tests, "rake test:functionals" has lots of failures. (This is true even if you try it directly on the unmodified "depot_r" directory distributed on the Prag. Prog. web site.)--Brent J. Nordquist #34675: At the end of the section on unit tests, "rake test:units" runs cleanly, and the same with the section on integration tests. But at the end of ...more...
|
B1.6
29-Sep-08
|
|
| 227 |
|
#33366: "We saw an example of multiple sessions in the test on page 225." The example actually starts on 226.
|
B1.3
30-Jul-08
|
|
| 227 |
|
#36040: I've read section 13.4 _thoroughly_. Several times.
All the content describing the code for the integration test is fine and easily understandable. However, after the full source of the integration test, there's _nothing_ - the text jumps straight to the optional DSL-specific content.
*There simply isn't anything that mentions what you do with the integration test.*
Sure you have the source code [which is replicated in the appendix, so why it needs to be restated immediately after it was explained piece-wise already...I don't know] but the source needs to be accompanied by _some_ indication about what to do with the integration test, and _why_ integration testing is important.--Mark Glossop #36040: I've read section 13.4 _thoroughly_. Several times.
All the content describing the code for the integration test is fine and easily underst ...more...
|
B1.6
21-Nov-08
|
|
| 227 |
|
#36041: [Separate] Suggestion: move the DSL content to the _end_ of section 13.4, rather than smack-bang in the middle where it effectively interrupts the flow of the content.--Mark Glossop #36041: [Separate] Suggestion: move the DSL content to the _end_ of section 13.4, rather than smack-bang in the middle where it effectively interrupts ...more...
|
B1.6
21-Nov-08
|
|
| 240 |
|
#34750: "rake db:schema_migrations" instead of "rake db:schema_version",
since "task :schema_migrations"
|
B1.3
02-Oct-08
|
|
| 247 |
|
#35581: The Trac Timeline is no longer being used. This page should be updated to reflect Github/Lighthouse
|
B1.6
02-Nov-08
|
|
| 250 |
|
#34660: In section 14.4
"They’re surprised that they call a model class Person and
Rails somehow knows to go looking for a database table called people"
people table? or person table?
--Alfredo Rico #34660: In section 14.4
"They’re surprised that they call a model class Person and
Rails somehow knows to go looking for a database table called pe ...more...
|
B1.6
28-Sep-08
|
|
| 256 |
|
#35587: The phrase "you’ll be in an ruby-debug session" should be "you’ll be in a ruby-debug session".
--Bill Colvin
|
B1.6
03-Nov-08
|
|
| 256 |
|
#35887: "You can list source, exhamine your stack frames," should be "You can list source, examine your stack frames,"--Robert Kosek
|
B1.6
14-Nov-08
|
|
| 258 |
|
#35840: In the demo that starts off section 15.1, you might want to add
require 'activesupport'
to the top of code block so that this could be run using the irb shell. This is a given for some users, but may not be for rails beginners. Thanks.--Shilo #35840: In the demo that starts off section 15.1, you might want to add
require 'activesupport'
to the top of code block so that this could b ...more...
|
B1.6
12-Nov-08
|
|
| 261 |
|
#36017: puts string.at(2) #=> "w"
Should that not read "o" instead of "w" as "o" is the 2nd character in the string?
i.e.
puts string.at(2) #=> "o"--James West
|
B1.6
20-Nov-08
|
|
| 262 |
|
#35582: Inflector should be ActiveSupport::Inflector
|
B1.6
02-Nov-08
|
|
| 266 |
|
#35390: My ruby version is 1.8.7 (pathlevel 72) and it already has Symbol#to_proc!!. Of course, rails 2.1.1's Symbol class still redefine to_proc method, but it can raise confusing to reader if there isn't any mention about it. :-)--JinYoung,Heo #35390: My ruby version is 1.8.7 (pathlevel 72) and it already has Symbol#to_proc!!. Of course, rails 2.1.1's Symbol class still redefine to_proc meth ...more...
|
B1.6
22-Oct-08
|
|
| 275 |
|
#34677: "If we were to run migrations again at this point, nothing much would happen.
Each of the version numbers of the migration files would match with a row the
database, so there’d be no migrations to apply." Shouldn't this be "with a row IN the database"?--David Christiansen #34677: "If we were to run migrations again at this point, nothing much would happen.
Each of the version numbers of the migration files would match ...more...
|
B1.6
30-Sep-08
|
|
| 278 |
|
#35597: In Figure16.1:Migration and Database Column Types
db2 x :text should read:
blob(32768)
likewise oracle x :text should read
blob
(not clob)
Also, on postgresql x :binary, is "bytea" a valid column type (I don't know Postgresql).--shulet #35597: In Figure16.1:Migration and Database Column Types
db2 x :text should read:
blob(32768)
likewise oracle x :text should read
blob
...more...
|
B1.6
04-Nov-08
|
|
| 285 |
|
#34095: Listing of foreign_key helper is partly coloured green (after hash signs) what is a bit misleading because these are not comments in fact.
--Marek Solak
|
B1.4
17-Aug-08
|
|
| 291 |
|
#35598: The phrase "you’ll have to weight the risks" should be "you’ll have to weigh the risks"
--Bill Colvin
|
B1.6
04-Nov-08
|
|
| 293 |
|
#35600: Based on the instructions in the demo section, "unit_price" should be "total_price".
--Bill Colvin
|
B1.6
04-Nov-08
|
|
| 312 |
|
#36107: You write the following:
# Works
User.find(:all, :conditions => ["name like ?" , params[:name]+"%" ])
However, I could be wrong, but I believe this is opening your database to SQL injection. For example, if the user submits the name "%foo", then the substituted value will be "%foo%", which is not the programmer's desire. #36107: You write the following:
# Works
User.find(:all, :conditions => ["name like ?" , params[:name]+"%" ])
However, I could be wrong, but I ...more...
|
B1.6
24-Nov-08
|
|
| 313 |
|
#34730: I found the order by example a little confusing, simply because it was in the context of product orders. Here's the code:
orders = Order.find(:all,
:conditions => "name = 'Dave'" ,
:order => "pay_type, shipped_at DESC" )
There are four different uses of the word "order", and it took me a moment to think it through. This might mean it's a good example because it forces the reader to think, but I thought I'd point it out just in case it wasn't intentional.--David Christiansen #34730: I found the order by example a little confusing, simply because it was in the context of product orders. Here's the code:
orders = Order.find ...more...
|
B1.6
02-Oct-08
|
|
| 328 |
|
#36160: class Customer < ActiveRecord::Base
composed_of :name, :class_name => Name, ...
end
Above code makes an error. It must be
class Customer < ActiveRecord::Base
composed_of :name, :class_name => "Name", ...
end--JinYoung,Heo #36160: class Customer < ActiveRecord::Base
composed_of :name, :class_name => Name, ...
end
Above code makes an erro |