element that wraps the CSS class carts"
Fix: "
" should be "
" to be consistent with the referenced code.
By Developers, For Developers
PDF Pg | Paper Pg | Type | Description | Fixed on | Comments | ||
---|---|---|---|---|---|---|---|
81 | TYPO | In the PDF download, on page 81, the download links lead to 404’s. It’s possible the links are the same on other formats but I have not checked. media.pragprog.com/titles/rails5/code/rails51/depot_a/db/seeds.rb | 2017-05-28 | ||||
viii | SUGGEST | Shouldn’t the text be replaced with the current version (ie): | 2017-05-31 | Changed to Rails 5 | |||
ix | SUGGEST | During the ten years since its initial release….. maybe a small detail but since the first release (0.8.0 in rubygems - October 2004), there are more than ten years. | 2017-05-27 | I've updated the number to eleven. Counting of years in Rails typically starts with the 1.0.0 release on December 13, 2005. | |||
93 | ERROR | “After making this change, we rerun the tests, and they report that all is well.” Actually, at this point one of the tests fails (below), because test/fixtures/products.yml has “MyString” for the image_url attributes. This doesn’t get fixed until PDF p. 99 Error: | 2017-05-31 | ||||
199 | TYPO | Command line to launch foreman is misspelled “forman start -p 3000”, the “e” is missing in foreman. | 2017-05-28 | ||||
210 | SUGGEST | The react code adds the I missed this and had to go back and debug my react code to figure out why it wasn’t rendering but also not throwing any errors. | 2017-05-31 | Unfortunately, the current set of tooling either lets us highlight too much or too little. We will go with too much in the next beta. | |||
204 | TYPO | Mismatched double- and single-quote here: <select id=“pay_type’ name=”order[pay_type]"> | 2017-05-31 | ||||
6 | SUGGEST | update for rails 5.1.1 $ sudo gem install rails —version=5.1.0 —no-ri —no-rdoc should be $ sudo gem install rails —version=5.1.1 —no-ri —no-rdoc | 2017-05-27 | ||||
7 | SUGGEST | update for rails 5.1.1 $ sudo gem install rails —version=5.1.0 —no-ri —no-rdoc should be $ sudo gem install rails —version=5.1.1 —no-ri —no-rdoc | 2017-05-27 | ||||
12 | SUGGEST | update for rails 5.1.1 $ sudo gem install rails —version=5.1.0 —no-ri —no-rdoc should be $ sudo gem install rails —version=5.1.1 —no-ri —no-rdoc | 2017-05-27 | ||||
13 | SUGGEST | update for rails 5.1.1 $ sudo gem install rails —version=5.1.0 —no-ri —no-rdoc should be $ sudo gem install rails —version=5.1.1 —no-ri —no-rdoc | 2017-05-27 | ||||
14 | SUGGEST | apt-get install can be replaced with apt install (as used in previous page at the beginning). | 2017-05-27 | ||||
14 | SUGGEST | update for rails 5.1.1 $ sudo gem install rails —version=5.1.0 —no-ri —no-rdoc should be $ sudo gem install rails —version=5.1.1 —no-ri —no-rdoc | 2017-05-27 | ||||
15 | SUGGEST | update for rails 5.1.1 $ sudo gem install rails —version=5.1.0 —no-ri —no-rdoc should be $ sudo gem install rails —version=5.1.1 —no-ri —no-rdoc | 2017-05-27 | ||||
15 | SUGGEST | Before being able to install yarn on Ubuntu 16.04 you will need to do the two additional steps described in the yarn installation (yarnpkg.com/lang/en/docs/install/) to add the yarnk key and repository | 2017-05-27 | ||||
15 | SUGGEST | to install chromedriver in Ubuntu the sudo apt install chromedriver should be sudo apt install chromium-chromedriver | 2017-05-27 | ||||
16 | SUGGEST | update for rails 5.1.1 replace the two references for 5.1.0 with 5.1.1 | 2017-05-27 | ||||
24 | SUGGEST | rails 5.1.1 update If you get a Rails version other than 5.1.0 should be If you get a Rails version other than 5.1.1 | 2017-05-27 | ||||
25 | SUGGEST | rails 5.1.1 update Rails 5.1.0 application should be Rails 5.1.1 application | 2017-05-27 | ||||
199 | TYPO | “forman start -p 3000” should be “foreman” with an “e” | 2017-05-28 | ||||
73 | SUGGEST | Shouldn’t the output of the command ls -p be something like the following (default alphabetical order) ? app/ bin/ config/ config.ru db/ Gemfile Gemfile.lock lib/ log/ package.json public/ Rakefile README.md test/ tmp/ vendor/ | 2017-05-31 | ||||
75 | SUGGEST | In the scaffold file generation the test/helpers/products_helper.rb has been replaced (in 5.1.1) with test/system/products_test.rb Or is this a bug? | 2017-05-31 | ||||
77 | SUGGEST | Rails 5.1.0 application … should be replaced with Rails 5.1.1 application … and
with
| 2017-05-31 | ||||
14 | SUGGEST | the following line $ sudo apt-get install apache2 curl git libmysqlclient-dev mysql-server nodejs can be replaced with: $ sudo apt install apache2 curl git libmysqlclient-dev mysql-server nodejs apt install instead of apt-get install as used elsewhere | 2017-07-01 | ||||
1 | SUGGEST | Throughout the book, you use the words “simply”, “easy” and “just”. I’m a seasoned programmer, not a newcomer, but even so it’s jarring and a bit irritating to have the suggestion that something is trivial or simple. I wouldn’t be reading a technical book if the knowledge it contained was entirely self-evident. This is an amazing book and I think it would be even better without being jolted out of the flow with these throwaway terms. Thanks! | 2017-06-29 | ||||
58 | TYPO | `self.where(‘paid = 0’)` should be `self.where(‘paid == 0’)` | 2017-06-11 | ||||
58 | SUGGEST | Ignore my last suggestion! SQL! | 2017-06-11 | ||||
100 | TYPO | “remaing”, last para. | 2017-06-11 | ||||
108 | TYPO | <%= csrf_meta_tags %> repeated twice | 2017-06-11 | ||||
169 | TYPO | repeated “with”, line 4 first para. | 2017-06-11 | ||||
196 | TYPO | “becuase” in para that begins “Webpacker”. | 2017-06-11 | ||||
197 | TYPO | first para, ‘saved as’ instead of ‘saved us’ | 2017-06-11 | ||||
77 | OK |
should be replaced with
| 2017-06-17 | What is shown depends on your OS and other settings. What the book shows is what my machine shows. Practically, it won't matter, but if this creates some problem that we aren't aware of, please post another one (that is more specific) or try us in the forums. | |||
82 | ERROR | Image lorem.jpg has 0 size in the web page, tgz and zip files. | 2017-06-11 | ||||
47 | TYPO | Hi, The templates are badly referenced. Instead of the related chapters (as clickable link) the text “the (as yet) unwritten …” is written in read. Regarding older version the first template could reference “Generating HTML with ERB” and the last one could reference “Generating XML with Builder”. | 2017-07-21 | ||||
81 | TYPO | Hi, | 2017-07-21 | ||||
98 | TYPO | In the third line of the page, there is a reference to the older ‘rake test’ instead of ‘rails test’ | 2017-06-11 | ||||
98 | ERROR | The third “row” added in the fixtures named “ruby” has for its image_url attribute the value ruby.png… | 2017-06-11 | ||||
114 | TYPO | The fixture listing was modified earlier (on page 98). Here since it’s just a reminder there is no need to put the modification marks (arrows on the left). | 2017-06-11 | ||||
115 | ERROR | Hi, | 2017-06-11 | ||||
117 | ERROR | Hi, I tried the caching mechanism.. And the console should normally log as stated in the book some “Read fragment..” and “Write fragment..” lines. After many investigation ( I tried from scratch with a rails 5.0 app) and indeed those lines are logged out. But not with the version 5.1 of rails.. But I’m still wondering if caching really work? The only clue I have is that when caching occurs there is only one DB request which is actually the count request regarding the timestamp.. So I can confirm that at database level caching occurs, but since those lines about reading and writing fragments (fragment views indeed) I’m not sure about the view caching which is the most important here regarding the delays. | 2017-06-11 | ||||
85 | SUGGEST | Extra blank space inside the | 2017-06-11 | ||||
94 | SUGGEST | The following ….. should be . | 2017-06-11 | ||||
117 | ERROR | Continued.. E.g: config.action_controller.enable_fragment_cache_logging = true Maybe it’s worth adding this detail. | 2017-06-11 | ||||
119 | TYPO | In the second paragraph of the section ‘Iteration D1’, the following sentence “Every time a request comes in, we can recover the identity from the session …” has ambiguity with the word “identity”. I think that, as in the previous sentence the word “identifier” is more suited. Nevertheless, I’m non native english so this remark may be irrelevant. | 2017-06-11 | ||||
200 | TYPO | bin/webpack instead of bin/wepack | 2017-06-11 | ||||
xv | TYPO | Pedantic note. The first bullet point in “Who This Book is For” starts with “Introduced in Rails 5, Turbolinks”… Turbolinks was introduced in Rails 4, with the gem renamed to turbolinks-classic and the new version named Turbolinks 5. | 2017-06-17 | ||||
1 | ERROR | /forums/470/topics/15017#42487 Turbolinks, navigating back, and the react components don’t mix. Need to key off of the turbolinks event or disable turbolinks on this page or something. | 2017-06-30 | ||||
158 | ERROR | Hi, I bought that book specifically because it seems to deal with rails 5.1 and its supposed new way of managing the asset pipeline, but until now I don’t learn anything at all (except installing yarn in the first chapters which is not really something unable to do by itself). | 2017-06-17 | ||||
174 | TYPO | The reference to the chapter related to a plugin that handle Credit Card processing is absent. | 2017-07-21 | ||||
177 | ERROR | The listing at the top of the page seems to be erroneous.. is shown commented. | 2017-08-18 | ||||
188 | TYPO | In the second to last paragraph the word supplies is written with 3 ‘p’ (suppplies) | 2017-06-17 | ||||
198 | TYPO | In the 5th paragraph there is a mention to the ‘Rake’ task. | 2017-06-17 | ||||
92 | ERROR | The updated Product model containing the newly defined validations appears to be inaccurate. In this figure, the model lists the :image_url presence to be true, but later lists the :image_url, allow_blank: true. I believe the former should be removed. Hope this helps! | 2017-06-17 | This is intentional, but it's hard to miss why. On that same page: \n \n> Note that we use the allow_blank option to avoid getting multiple error messages when the field is blank. | |||
135 | SUGGEST | Add spacing around > sign in quantity > 1 (both in the comment and the where) | 2017-06-17 | ||||
158 | ERROR | The javascript still does not work even after installing jquery-rails in Gemfile and restarting the server. There is also another sqlite3 error, maybe when trying to click too fast (dev environment too slow)? Completed 500 Internal Server Error in 5048ms (ActiveRecord: 2.6ms) Completed 500 Internal Server Error in 5063ms (ActiveRecord: 5032.7ms) ActiveRecord::StatementInvalid (SQLite3::BusyException: database is locked: UPDATE “line_items” SET “quantity” = ?, “updated_at” = ? WHERE “line_items”.“id” = ?): ActiveRecord::StatementInvalid (SQLite3::BusyException: database is locked: commit transaction): app/controllers/line_items_controller.rb:33:in `block in create’ | 2017-07-02 | Added a mark to indicate that the require jquery line was new | |||
160 | TYPO | Now that we have the jQuery-UI libraryjQuery-UI library available ….. But on page page 161, only one line is indicated as new: | 2017-07-02 | ||||
161 | OK | should indentation be used in the _line_item.html.erb code listing for the lines with the | |||||
2017-07-02 | The indentation of the | ||||||
164 | ERROR | Running ls -p app gives us eight folders and not six. The channels and jobs are missing | 2017-07-02 | ||||
173 | ERROR | Note that we didn’t specify any data type for three out of the four columns. this should be two out of the four as address:text and pay_type:integer | 2017-07-02 | ||||
174 | OK | AddOrderIdToLineItem: migrating = should be (add_reference, foreign_key): 20170628162816 AddOrderToLineItem: migrating = | 2017-07-02 | That's not what I see when I run the commands. | |||
175 | SUGGEST | “Checkout” used with double quotes | 2017-07-02 | ||||
224 | ERROR | Hi, | 2017-07-02 | ||||
226 | OK | It seems to lack fixtures settings in order to link the line item to the order. By adding eg. “order: one” now the tests pass. | 2017-07-03 | This should have been done on page 181. | |||
229 | OK | Hi, | 2017-07-03 | Those lines would have been added if you did the playtime exercise on page 190. If you chose to skip that step: no problem. | |||
229 | ERROR | Hi, | 2017-07-03 | It's deliberately weird and different from the method we implement in Order to stress the fact that we are integrating with a third party. | |||
241 | ERROR | Hi the link to the Rails library is “slightly” outdated, it points to the version 3.2 of Rails. | 2017-07-02 | ||||
181 | SUGGEST | When trying to run the tests there is an error: ActiveRecord::Fixture::FixtureError: table “line_items” has no column named “order”. On page 181, there is a mention that we would need to change all references to products and carts if the optional exercises are not done. By changing the following fixture in test/fixtures/line_items.yml from two: to two: the tests should be passing again. | 2017-07-21 | When I run tests out of the downloaded code in depot_p, I get a failure around a missing method that we add in the following section, but the error you describe doesn't happen for me. Can you post in the forum if you are having this problem, and maybe a link to your in-progress code? | |||
7 | ERROR | The command for installing ChromeDriver is denoted as: $ sudo apt install yarn chromedriver However, the package name has changed. Using the default vagrant box from the rails/rails-dev-box git repo (Ubuntu 17.04), the command to use would be: sudo apt install yarn chromium-chromedriver | 2017-07-21 | ||||
25 | ERROR | The command “sudo apt install yarn chromedriver” failed. Instead I ran “sudo apt install yarn chromium-chromedriver” | 2017-07-21 | ||||
108 | ERROR | Hi, In the screenshot of the page 240 we can see for the first time the title (Pragmatic Bookshelf) appearing in the header of the page. How this title is set by the instance variable (@page_title) is explained but where this instance variable was not explained. Where should we set that instance variable ? I guess that could be in application_controller.rb but not sure if this is the best way. Moreover it seems that we can also set a default value right in the view as it’s supposed to be when we look at page 397 (something like that: <%= @page_title || “Pragmatic Bookshelf” %>) | 2017-08-18 | ||||
173 | 160 | TYPO | “Install thes gems” should read “Install these gems”. | 2017-07-21 | |||
208 | 197 | TYPO | “this saved as a ton of time and aggravation” should read “this saved us a ton of time and aggravation”. | 2017-07-21 | |||
181 | 165 | TYPO | “doesn’t even ned an ending tag” should read “doesn’t even need an ending tag”. | 2017-08-18 | |||
98 | TYPO | In products.yml fixture file the book ‘ruby’ should have ruby.jpg instead of ruby. png, because the file name in images directory is ruby.jpg. This issue is triggered when the bin/rails test is running, after the update of products_controller_test.rb as described on page 101. | 2017-08-18 | ||||
92 | TYPO | The {..} hashes sometimes have extra spaces, sometimes not. | 2017-08-18 | ||||
184 | 168 | TYPO | The URL “coffeescript.org” has broken over two lines and been hyphenated as “coffee-script.org”. This URL leads to a Chinese site. Would suggest marking the URL style as non-hyphenatable to avoid this confusion — the hyphenated site looks like a translation of the official one, but it could easily be malicious. | 2017-08-18 | |||
199 | 183 | SUGGEST | The line “sqlite3 -line db/development.sqlite3” can be replaced by “rails dbconsole”, which is a useful command to know as it also works with other database engines :) | 2017-08-18 | |||
7 | ERROR | The current rails-dev-box.git doesn’t work with the libvirt backend - I changed it to use wholebits/ubuntu17.04-64 but it needed additional packages to get ‘gem’ working. In addition chromedriver is now chromium-chromedriver. | 2017-08-18 | ||||
1 | ERROR | test/capybara issue outlined in /forums/470/topics/15236/posts/new? | 2017-08-18 | ||||
237 | 222 | SUGGEST | The use of mail.body.encoded in the test for the HTML part of the email (in the “shipped” test) is not a great idea if you have non-US-ASCII characters in the mail (say, you had typed the times character directly rather than using ×) as you cannot test without knowing its encoded form. It would be better to test the HTML against mail.html_part.body.decoded, especially as this can’t be tricked by something in the text part :) | 2017-08-18 | This is what the Rails generator produces, and it's one less thing to have to explain to the reader about changing. We're trying to stick to what Rails does by default, but I do take your point. | ||
240 | 225 | ERROR | The code as provided does not run; either jobs/charge_order_job.rb needs to call order.make_payment or models/order.rb needs to define charge!(pay_type_params) rather than make_payment(pay_type_params) | 2017-08-18 | |||
288 | 273 | ERROR | The code for the locale switcher includes `javascript_tag “$(‘.locale input’).hide()”`, but this requires jQuery, which is no longer included in the application. | 2017-08-17 | |||
186 | SUGGEST | Products have many line_items, and line_items belongs to an order. should be (line_items is plural) Products have many line_items. and line_items belong to an order. | 2017-08-18 | ||||
187 | SUGGEST | ActiveRecord::HasManyThroughSourceAssociationNotFoundError (Could not find the source association(s) “order” or :orders in model LineItem. Try ‘has_many :orders, :through => :line_items, :source => This is because the belongs_to :order is missing from the line_item model. As a general note it would be good, if possible, to have the code working even when the additional exercises are not completed. | 2017-08-18 | That association is added on page 180. | |||
192 | SUGGEST | the command bin/rails webpacker:install fails with the following message Node.js not installed. Please download and install Node.js (node_url) even though nodejs was installed in previous chapters. Following the instructions in nodejs installation: installs version 6.11.1 and then the webacker:install works. | 2017-08-18 | ||||
304 | 290 | OK | The three ‘role’ lines only work if the username on the deployment server is the same as on the server you are deploying from. It would be better to replace the three lines with this: server domain, roles: %w{web app db}, user: deploy_user, primary: true where deploy_user is a variable containing the username on the deployment server. If not, there should be a prominent warning that this setup will only work if the two usernames are the same, and there should be a link to a more comprehensive setup guide. | 2017-10-07 | While there are indeed many ways in which the target environment could be different than the development environment, going down the path of trying to describe each would require a full book. This chapter is only meant to describe enough to (a) get you started, and (b) get you to the point where you know enough to ask and look for the answers to the right questions. | ||
308 | 294 | SUGGEST | Iteration L3 ends with the paragraph “Although our job is just starting when we first deploy our application to pro- duction, we’ve completed our tour of the Depot application. After we recap what we did in this chapter, let’s look back at what we’ve accomplished in remarkably few lines of code.” This probably needs to be moved to the end of L4. | 2017-08-18 | |||
29 | SUGGEST | In the diagram showing file structure the hello.html.erb file is pointing to a block that contains the generated html instead of the erb file content. This might be confusing to a reader who is yet unfamiliar with how the html is created. | 2017-08-17 | ||||
163 | TYPO | Hello. Seems like tiny typo on page 163 pdf —-> Apparently, there are eight subdirectories. | 2017-08-18 | ||||
108 | TYPO | rails51/depot_e/app/views/layouts/application.html.erb’s newly added HTML elements: around the previously added .. element and while the closing element should be , in the B6.0 version it is . | 2017-09-10 | ||||
2 | SUGGEST | Before installing the ChromeDriver package, I suggest that you recommend updating the package lists with sudo apt-get update. I was not able to install ChromeDriver until I performed this step. | 2017-09-10 | ||||
90 | TYPO | the image for the new page is showing a value in the price, (0.0) which would only show up in the page if there was a default and at least in the process i have used so far this has not been added… or the user had typed 0.0. also, if price is blank “Price is not a number”, takes priority over “Price must be greater than or equal to 0.01” yes, nitpicky. what can i say… | 2017-09-10 | The screenshot is generated from the actual code produced in the book. | |||
225 | TYPO | We haven’t declared a construtor yet, should be We haven’t declared a constructor yet, | 2017-09-10 | ||||
223 | SUGGEST | I think is better than There is no reason to remove id element. | 2017-09-10 | adding ids is usually considered a bad practice, because it means you cannot use the markup on another page that might be using that id. Although Rails does add them, there is no benefit to doing so, since we aren't using them to locate DOM elements or style. | |||
111 | TYPO | I could be wrong because I am new to coding, but the text here says: “… an img selector is nested inside the #banner selector. Also, an a selector is inside the #side selector.” Out of the four selectors mentioned in those sentences, the only one I see in the code I read and copied out of the book is the “a” selector. I do not see “img”, “#banner”, or “#side” selectors in the snippet of SCSS we wrote in the “application.scss” document mentioned in this section of the book. I did not download the source, so I don’t know if it matches the book or not. Again, I’m a new coder, but I’m pretty confused here. | 2017-09-10 | ||||
142 | ERROR | There is a sentence: “Invalid carts aren’t our biggest problem here; we also want to prevent access to other people’s carts.” If I understand correctly, preventing :cart_id from line item URL prevents only manipulating someone else’s cart. Unfortunately it doesn’t prevent access someone else’s cart, as for instance my cart ID is 7, but I can see the previous cart: localhost:3000/carts/6 | 2017-09-10 | ||||
146 | TYPO | cart/show/html.erb: HTML element mismatch, in the PDF: |
Total: It should be |
2017-09-10 | |||
154 | ERROR | The cart’s partial template (rails51/depot_j/app/views/carts/_cart.html.erb) contains the representation of the notice, even if it is shown by show.html.erb, and the text also mentions that the notice is not used here: “This is basically our carts/show.html.erb | 2017-10-07 | I'm not following the problem here. I looked at this part of the book and it looks correct/intentional to me. | |||
159 | SUGGEST | Indentation missing after the <% if @cart %> | 2017-10-07 | Can't find this issue on the given page or near it. | |||
166 | SUGGEST | Indentation missing after <% if line_item == @current_item %> | 2017-10-07 | I can't find where this issue exists. It's not on the given page. | |||
169 | SUGGEST | parens should be parentheses | 2017-10-07 | "parens" is allowed by our style guide and is a legit word: http://www.dictionary.com/browse/parens | |||
177 | SUGGEST | Missing identation inside for the buttons. | 2017-10-07 | I can't see where the indentation is messed up | |||
177 | SUGGEST | Should the code for the controller (in the link) have two different private sections? | 2017-10-07 | Both the code download from the .zip and the link only have one private section that I can see. | |||
188 | SUGGEST | The default display for SQLite version 3.11.0 when running a quer is different from the one displayed on the book. ie. it is one line without any headers sqlite> select * from orders; | 2017-10-07 | ||||
442 | TYPO | “After you bundle install, there is a new generator available that will set up RSpec for you: | 2017-10-07 | ||||
1 | ERROR | See /forums/470/topics/15492#43428 text indicates tests are passing, but they are not | 2017-10-07 | ||||
1 | 1 | TYPO | /forums/470/topics/15495#43436 | 2017-10-07 | |||
181 | SUGGEST | Indentation missing after for ‘Empty cart’ and ‘Checkout’ buttons | |||||
202 | 203 | SUGGEST | You should mention that the server needs restarting after installing webpack and co… | ||||
94 | ERROR | Two things: if you just run the tests, there are lots of errors from the controller test. You might hint for that to prevent confusion, if the reader just retypes the “main” test command (or uses the command history). Second: when you run JUST the model tests, you get a failure in product_test.rb line 11 because a blank image_url is tolerated and when you create a new product I suppose the image_url is empty. | |||||
113 | TYPO | English is not my first language, so I am not really sure… Shouldn’t it be “and other spAcing directives”…? | |||||
217 | SUGGEST | the link for the code for orders_controller.rb has two private keywords (lines 81 and 93). | |||||
136 | ERROR | `current_item.quantity += 1` no method error The same occurs in my remove_one method which looks like this ` def remove_one The solution is to ensure that a reference to self is used so This may be an issue with the latest version of rails or Ruby. Or maybe an intentional change. | |||||
225 | SUGGEST | The smtp setup should be inside the existing `Rails.application.configure` It’s just a little confusing | |||||
245 | ERROR | On page 245 of the pdf you state "To improve the appearance of the page, we add | |||||
249 | ERROR | On page 249 of the pdf you state the following This form is different from ones you saw earlier. Rather than using form_with , And the code does show that, however form_for and form_tag are being deprecated in favour of form_with and the code should be updated to use form_with rather than form_tag | |||||
140 | ERROR | If you just change the assert_select to the new line item titel it will fail, since it finds the li from the ‘.side_nav’ navigation. | |||||
151 | TYPO | In the last sentence i found “…any cart other than than one currently…”. | |||||
151 | TYPO | On the first block of text it goes „Next. we …“ | |||||
255 | SUGGEST | On page 255 of the pdf when discussing tyhe integration test setup you state That statement needs clarification. How is it only called if a session is defined? | |||||
226 | SUGGEST | If you’re thinking to yourself that this looks like a controller, that’s because it does. wouldn’t it be better as the following? If you’re thinking to yourself that this looks like a controller, that’s because it is. | |||||
149 | TYPO | On the second line of the page I think the reference to “…/carts.css” is missing an S as in “…/carts.scss” | |||||
7 | ERROR | ` sudo apt install yarn chromedriver` "ubuntu@rails-dev-box:~$ sudo apt install yarn chromedriver E: Package ‘chromedriver’ has no installation candidate" | |||||
13 | xi | TYPO | In the last paragraph, second to last sentence, the first occurrence of “which” should be “with”. It should say, “Rails 5.1 brings Webpacker, with a preset configuration for Webpack, …”. | ||||
50 | 29 | TYPO | In the paragraph after the “Dynamic Content” heading, third sentence, there is an extra word “is” before the word “named”. It should say, “That’s the template file named hello.html.erb; …”. | ||||
103 | TYPO | The Rails helper method called does this by setting the CSS class of each row to either list_line_even or list_line_odd, automatically toggling between the two style names on successive lines. The name of method (word ‘cycle’) is missing. | |||||
233 | SUGGEST | Adding the line in app/models/order.rb also needs the gem to be installed. gem ‘activemodel-serializers-xml’ | |||||
151 | 133 | TYPO | In the first paragraph, third sentence, there is a missing word “in” after the word “residing”. It should say, “… where the cart ID is internal state data residing in a cookie.”. | ||||
16 | ERROR | Not sure if this is your issue or mine. I’ve followed the installation instructions to install rails. I decided to try and follow your guide exactly so was using all the tool versions you specified aside from Ruby itself, which I previously updated to 2.4.2p198. I installed Rails 5.1.3 and then created your demo app. When running “bin/rails about” I noticed that somewhere along the line Rails got updated to 5.1.4 so I went back to p.16 and followed your instructions. However, putting the rails version between underscores doesn’t work as you describe: Shareefs-MacBook-Pro:demo sjalloq$ rails 5.1.3 —version Shareefs-MacBook-Pro:Rails sjalloq$ rails 5.1.3 new demo | |||||
279 | SUGGEST | metodo de pago | |||||
281 | SUGGEST | The screenshot contains the spanish text and not the english one. | |||||
33 | ERROR | Download location for nodejs is here: web page nodejs.org/en/download/ | |||||
35 | SUGGEST | The commands you enter to see the version numbers doesn’t include checking for the version of yarn and chromedriver. should also have: > yarn —version NB: The screenshot shows this already so that doesn’t have to be updated. | |||||
`72 | SUGGEST | Page 72, states that you’ll need to substitute the caret for the backslash at the end of the line and a backslash for the forward slash, but forgets to mention that you also need to add ’ruby’at the front of the command. | |||||
78 | SUGGEST | Page 78, when you try run ruby bin\\rails test it says you need to perform a migration: ruby bin\\rails db:migrate RAILS_ENV=test (after this it runs fine) | |||||
214 | SUGGEST | For Cloud9 IDE: Install chromedriver as follows: Update /depot/test/application_system_test_case.rb from: Then system test may be run with the command: | |||||
259 | 242 | ERROR | In the sketch on the top there is a box “Controller” with a function “login” that is never implemented. | ||||
254 | 237 | SUGGEST | In the last paragraph you suggest using “legend” and “fieldset” tags, but they are not showing up in the code example that follows. | ||||
229 | 212 | TYPO | In orders_controller.rb, the case statements for the pay_type should be changed from “Credit Card” to “Credit card”, lowercase ‘c’ on ‘card’. Same with “Purchase Order”, should be lowercase ‘order’. | ||||
217 | TYPO | (Note: I am using an online reader, so the page# given is probably not correct — it is dynamic based on font size, etc.) This is in section “Iteration F1: Moving the Cart” Current text: "Note that we’ve given the element that wraps the CSS class carts" Fix: " " should be " " to be consistent with the referenced code. | |||||
218 | TYPO | (Note: I am using an online reader, so the given page number is probably incorrect.) Section: “Iteration F1: Moving the Cart” The screenshot displayed here is slightly ahead of the text. In particular the section in the picture labeled “Your Pragmatic Catalog” actually replicates the Cart at this point. The following section “Changing the Flow” corrects this. | |||||
184 | ERROR | Why set “belongs_to :product, optional: true”? Each lineItem must have a product. I think it should be “belongs_to :cart, optional: true”? The correct version is: rails51/depot_o/app/models/line_item.rb class LineItem < ApplicationRecord | |||||
228 | ERROR | The expiration date is splitting on `//` and not on `/\\/` | |||||
36 | TYPO | as you would be should you be | |||||
278 | ERROR | The third bullet under ‘Playtime’ refers to Order::PAYMENT_TYPES, which doesn’t exist. In fact, the payment types were translated in an earlier part of the chapter (p. 267). I suspect that this may be a holdover from an older edition of the book. | |||||
179 | TYPO | There is an error explaining the arguments of the following code: “form_with(model: @order, local: true)” quoting the text: it should be “The first argument, model: @order tells the helper” | |||||
106 | TYPO | Dead link for zenspider quick ref. New link is :- | |||||
16 | SUGGEST | I also encountered the situation where I installed the Rails 5.1.3 gem (on Ruby 2.4.1), but running ‘rails new demo’ automatically installed 5.1.6, the latest version to date. I discovered that I had to edit my Gemfile to revert back to Rails 5.1.3: gem ‘rails’, ‘5.1.3’ # with no ‘~>’ Then ‘bundle install’, and then after the list of dependency errors, run ‘bundle update’ as it suggests. This reverts Rails back to 5.1.3. Might save others trouble if you could include a short explanation at this point on how to force Rails 5.1.3 for future readers, and what the ‘~>’ in the Gemfile actually means. I posted full answer on SO, for reference (google “Why does Rails new install rails 5.1.6?”). Otherwise, great book! I’m learning a lot, thanks. | |||||
293 | 276 | ERROR | The language-button on the top of the webpage doesn’t work correctly because there was an expression missing in my config/routs.rb. | ||||
184 | ERROR | At the end of the page, the LineItem model is modified as follows: belongs_to :order, optional: true However, a line item is always associated with a product, while on the other hand a line item is not always in a cart (i.e. when a user checks out each item in the user’s cart will get cart_id set to nil before the cart is deleted). So it seems like a more correct configuration would be belongs_to :order, optional: true | |||||
246 | ERROR | On p. 246, we whitelist a bunch of actions after having added the authorize callback to all actions. However, the whitelisted actions are incomplete. It is necessary to also whitelist the following to actions: CartsController :show (otherwise impossible for non-admin to view cart) LineItemsController :destroy (otherwise impossible for non-admin to remove items from cart) | |||||
344 | TYPO | “thows” should be “throws” | |||||
74 | ERROR | The migration fails because the generated code has : title instead of :title in the products.rb code and also in one other location. Removing the space inbetween “:” and “title” in both cases solves the problem. | |||||
74 | ERROR | Further to my previous post, the : title problem occurs all over the app… syntax error, unexpected ‘:’ …ut_buffer.append=( form.label : title ); Extracted source (around line #15): <%= form.label : title %> | |||||
73 | SUGGEST | Further to my two prior posts on this issue regarding the : title problem (p73 not -p4 as reported), the issue is caused by an unfortunate line-wrap in the command: bin/rails generate scaffold Product \\title:string description:text image_url:string price:decimal Which appears in the book as: bin/rails generate scaffold Product \\ There is a space before the “\\” but there must not be a space after the “\\” Life is fun, is it not? | |||||
73 | SUGGEST | It would be useful to be able to edit one’s own posts - typos are easy to make… The error reported on p74 was on p73. The reference to p4 was just another typo… | |||||
179 | TYPO | The first argument, module: @order tells the helper which instance variable to use when naming fields and sending the form data back to the controller (the second argument tells Rails not to post this form via Ajax, which became the default in Rails 5.1). should be The first argument, model: @order tells the helper which instance variable to use when naming fields and sending the form data back to the controller (the second argument tells Rails not to post this form via Ajax, which became the default in Rails 5.1). | |||||
205 | ERROR | Iteration H1. | |||||
180 | 180 | ERROR | The following code can not set id in select field <%= form.select :pay_type, Order.pay_types.keys, id: :order_pay_type, prompt: ‘Select a payment method’ %> It is necessary to modify the code as follows. <%= form.select :pay_type, Order.pay_types.keys, {prompt: ‘Select a payment method’}, id: :order_pay_type %> | ||||
146 | SUGGEST | Implementation of ```cart#total_price` can also be written shorter: ``` | |||||
214 | TYPO | Second to last paragraph says “adding that item to the card.” I believe this is meant to say “cart”. | |||||
189 | TYPO | A number of different feed formats exit should probably read… A number of different feed formats exist | |||||
179 | TYPO | In the fifth line, there’s a html/ruby code: “<%= form_with(model: @order, local: true) do |form| %>” While, in the 13th line, there’s a reference to that line, but instead of “module” it should be “model”: “The first argument, module: @order tells the helper which instance variable to” It’s just a small typo error. Have a nice day. Regards. | |||||
190 | ERROR | The who_bought.atom.builder file seems to have an error. When typed as written on line 3 (feed.updated @latest_order.try{:updated_at}, the site, and feed readers throw an error ( undefined method “xmlschema” for :updated_at:Symbol ). | |||||
36 | 13 | ERROR | At the end of the page, we are told install ChromeDriver for MacOS X using the following command: brew install chromedriver However, the following error is given when running this command: Error: No available formula with the name “chromedriver” If you follow the instructions given, it works as expected: >> brew tap homebrew/cask >> brew cask install chromedriver ######################################################################## 100.0% | ||||
47 | ERROR | A new version (1.4.0) of the sqlite3 gem was released in February 2019. This version does not seem to play nicely with the app that we’re creating. I get the following error: Specified ‘sqlite3’ for database adapter, but the gem is not loaded. Add `gem ‘sqlite3’` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). Forcing the sqlite3 gem version to the latest 1.3 version (that is, 1.3.13) in the app’s gemfile, then running bundle install and bundle update, sorts out this issue. | |||||
197 | 179 | TYPO | In first paragraph under code block: |