small medium large xlarge

Errata for The Rails View

 

The latest version of the book is P1.1, released about 4 years 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.

By default this page displays the errata for the latest version of the book. If you have a previous version, select it here:

If you've found a new error, please submit it.

  • Typo
  • Tech. error
  • Suggestion
  • Maybe next edition
  • Not a problem
  • Reported in: P1.1 (16-Aug-12)
#49699
PDF page: 0
Gemfile.lock should be included with the code, so that bundle install will always work intended with gem versions locked down, even when newer gem ver...more...
  • Reported in: P1.1 (16-Aug-12)
#49701
PDF page: 0
More functional controller code (for crud and site navigation) can be included so that the reader can navigate to and see the various views more easil...more...
  • Reported in: P1.1 (12-Sep-12)
#49797
PDF page: 0
Paper page: 0
In the code, there is a redundant migration 20110926060144_create_designers.rb which conflicts with 20111008052704_devise_create_designers.rb--Willia...more...
  • Reported in: P1.1 (17-May-12)
#49349
PDF page: 0
Example code's Gemfile doesn't set a version for Devise and 2.1.0 introduces breaking changes, causing the migration to fail. "~> 2.0.0" fixes the iss...more...
  • Reported in: P1.1 (22-Nov-12)
#50191
PDF page: 1
A few people have mentioned the problem with Devise. One user (Jean-Charles Sisk) suggests using gem 'devise' '~ 2.0.0' in the Gemfile but this st...more...
  • Reported in: P1.1 (24-Apr-13)
#51377
PDF page: 1
In the epub version (iBooks on iOS 6), code listings have a consistent problem showing html tags. Every line ending with '> or "> (a single or double ...more...
  • Reported in: P1.0 (31-Mar-12)
#49040
PDF page: 8
In the code download for the book, I notice that you include the 2 html fragments in code/layout/boilerplate. Since these are not linked to in the bo...more...
  • Reported in: P1.0 (07-Apr-12)
#49078
Paper page: 10
Usually your writing style is the classic "tell me what you are going to tell me, tell me, then tell me you told me", which is an excellent way to wri...more...
  • Reported in: P1.0 (18-May-13)
#51540
Paper page: 11
normalize.css "and place it into our app/assets/stylesheets directory". Since that stylesheet is "owned by outside entities" (text from Rails Guide on...more...
  • Reported in: P1.0 (26-Apr-12)
#49201
Paper page: 15

In the sample code it says to
<%= render 'layout/header' %>
when it should be layouts
<%= render 'layouts/header' %>--Dexter Liu

  • Reported in: P1.0 (30-Mar-12)
#49033
PDF page: 15
In the paragraph immediately preceding the html for _header.html.erb, last sentence, you say to change the file to have the following contents. Howev...more...
  • Reported in: P1.0 (31-Mar-12)
#49041
PDF page: 15
In the listing for app/views/layouts/application.html.erb, since the image for tagline.png is going to appear in Figure 4., you should probably includ...more...
  • Reported in: P1.1 (12-Apr-12)
#49102
PDF page: 15
In the sample code the following line is used <meta charset="utf-8"> the tag is never terminated it should probably say <meta charset="utf-8...more...
  • Reported in: P1.0 (04-Jan-13)
#50435
Paper page: 17

when running rake setup on the layout project get this error: rake aborted! undefined method 'client_id' for nil:NilClass

  • Reported in: P1.1 (04-May-12)
#49280
PDF page: 17
In this page we read "Looking at the header, we see it’s 78 pixels tall" but, where do we see it? I can't find any figure or specification in the prev...more...
  • Reported in: P1.0 (31-Mar-12)
#49037
PDF page: 20-21
In the code for app/views/layouts/application.html.erb, the lines for the image_tag have not been mentioned before so it is somewhat of a surprise tha...more...
  • Reported in: P1.1 (19-Sep-12)
#49824
Paper page: 24

Not opening UL tag, not closing NAV tag. Here's a pic: instagr.am/p/PsGLfjA0L4/ --Nando Vieira

  • Reported in: P1.1 (16-Aug-12)
#49702
PDF page: 26
No css definition is shown or mentioned for class="ir" which is used in the templates on page 26 and others. For those who attempt to reconstruct the ...more...
  • Reported in: P1.1 (08-Apr-12)
#49084
PDF page: 26
The layout on page 20 uses render STRING for rendering the header and the footer partials. But then there are partials in some places that are rendere...more...
  • Reported in: P1.1 (16-Aug-12)
#49700
PDF page: 28
A designer/_designer.html.erb partial template is required for <%= render @project.designers %> to work, and the view containing it to render without ...more...
  • Reported in: P1.1 (18-Jun-13)
#52028
PDF page: 32

I think the file navigation_helper.rb needs a module wrapper

module NavigationHelper
...
end--Bob Gustafson

  • Reported in: P1.1 (18-Jun-13)
#52031
PDF page: 32

You have " with the right tab activated:"

I would say " with the correct tab activated:"--Bob Gustafson

  • Reported in: P1.1 (21-Apr-12)
#49170
PDF page: 40
"shows an examploe of the application window" (sorry for reporting a trivial typo, but I really just wanted to play with the 'report erratum' tool)...more...
  • Reported in: P1.1 (23-Apr-12)
#49183
PDF page: 40

4th paragraph, last sentence has the word 'examploe' instead of 'example'--Greg Pederson

  • Reported in: P1.1 (05-Apr-13)
#51233
PDF page: 49
This is a grammatical mistake with the word "creation"...It should read "...our enterprise users is fine-grained control of creating permissions used ...more...
  • Reported in: P1.1 (07-Apr-12)
#49080
PDF page: 49
Paper page: 35

the edit_creations_path(@creation) should be edit_creation_path(@creation)--Romeo Giezendanner

  • Reported in: P1.1 (25-Mar-13)
#51132
PDF page: 50

In the penultimate paragraph the Haml templating language is refered to in all caps. According to haml-lang.org it's Haml, not HAML.--Katrina Owen

  • Reported in: P1.1 (03-Jun-13)
#51816
PDF page: 54

Got this line "shows an examploe of the application window". --Nigel Lowry

  • Reported in: P1.1 (09-Apr-12)
#49094
PDF page: 57
The method 'creation_reference' refers to a field, 'format' on the creation object i.e. #{creation.format.upcase}. That field is not in the model, hav...more...
  • Reported in: P1.1 (08-Apr-12)
#49085
PDF page: 59
When the text introduces the explicit alt attributes for images, it uses a wording that I think may suggest to the reader that the image tags are lack...more...
  • Reported in: P1.0 (06-Apr-12)
#49076
PDF page: 60
when browser localhost:3000/creations/ , it gets an errors: undefined method `default_image?' for #<Creation:0x00000005249640> Extracted source (...more...
  • Reported in: P1.1 (09-Apr-12)
#49089
PDF page: 63
The name of Rails components has a space. ActiveRecord (fixed-width font), is a Ruby module, whereas Active Record (regular font) is the name of th...more...
  • Reported in: P1.1 (21-Aug-12)
#49717
Paper page: 69
The if-else block (<% if @creation.default_image? %>) within _creation.html.erb on Page 69 does not continue from the state where it was last referenc...more...
  • Reported in: P1.1 (09-Apr-12)
#49091
PDF page: 70
The helper switching_creation_tag_for is a extraction of content_tag_for in the previous page, but it does not generate the data-id attribute.--Xavier...more...
  • Reported in: P1.1 (06-May-12)
#49290
PDF page: 73
The test code uses an older version of Devise, so the migrations fail with an upgrade message from devise 2.0.4. If there is an older version, could ...more...
  • Reported in: P1.1 (23-Aug-12)
#49734
PDF page: 74
The line: *= require formtastic needs to come before the other sprocket directives that are meant to override the default styles that come with form...more...
  • Reported in: P1.1 (12-May-12)
#49309
PDF page: 80

In interested.css.scss,
font-style: bold;
should be
font-weight: bold;--Graeme McLean

  • Reported in: P1.1 (12-May-12)
#49310
PDF page: 80

Also in interested.css.scss,
font-italic: italic;
should be
font-style: italic;--Graeme McLean

  • Reported in: P1.1 (23-Aug-12)
#49732
PDF page: 85
The styles used for section#sidebar to illustrate the popout mixin, are in conflict with those already defined on pages 24-25. Note that this is not i...more...
  • Reported in: P1.1 (23-Aug-12)
#49731
PDF page: 90-91
The styles used to create the icons using sprites, are not working as stated in the book. I found that the following has to be added: p.sprites { ...more...
  • Reported in: P1.1 (21-Apr-12)
#49171
PDF page: 95
The description of why we need to list the eot file twice (once with ?iefix) is confusing, because it keeps referencing "the local() value", but the c...more...
  • Reported in: P1.1 (08-Apr-12)
#49086
PDF page: 95
Paper page: 82

h3 {
color: $dark-green
font: italic bold 20px $accent-font;
}

; behind $dark-green is missing--Romeo Giezendanner

John M Athayde says: Actually, this should be dark-blue anyways. But it is missing the semi-colon. Adding a separate errata for the content error.
  • Reported in: P1.1 (08-Apr-12)
#49087
PDF page: 95
Paper page: 82

$dark-green should be $dark-blue--Romeo Giezendanner

  • Reported in: P1.1 (09-Apr-12)
#49090
PDF page: 95
Paper page: 82

In the CSS selector for h3, $dark-green is not the variable we should be working with, but $dark-blue. --John M Athayde

  • Reported in: P1.1 (12-Sep-12)
#49803
PDF page: 102

Since 'View All Comments' is shown by default, they should be hidden on page load:

$(document).ready ->
comments.slice(3).hide()--William Ko

  • Reported in: P1.1 (08-Apr-12)
#49088
PDF page: 104
Paper page: 91

In code-file artflow/css/app/assets/stylesheets/icons.css.scss the -ms-filter attribute are the char " wrong.--Romeo Giezendanner

  • Reported in: P1.1 (22-Apr-12)
#49174
PDF page: 107
In "...for the semantic_form_for() we learned about in Formtastic, on page 138," "learned" should be changed to "will learn" since it refers to a late...more...
  • Reported in: P1.1 (09-Apr-12)
#49093
PDF page: 114

In Code File: artflow/js/app/views/creations/show.html.erb Version v2 and v3 on line 13 is %> missing--Romeo Giezendanner

  • Reported in: P1.1 (10-Apr-12)
#49095
PDF page: 125
Paper page: 113
running the cucumber test: artflow/js/features/session.feature fails with the following Error: ActionView::Template::Error: undefined method `with_sta...more...
  • Reported in: P1.1 (11-Apr-12)
#49100
PDF page: 128

In the code snippet at the bottom of the page some tabindex are strings, and some others integers.--Xavier Noria

  • Reported in: P1.1 (06-Jun-12)
#49411
PDF page: 129
wondering if this line is a typo: chad> ruby script/generate model User shouldn't the command be "rails" rather than "ruby"?--William E Den Best...more...
  • Reported in: P1.1 (06-Jun-12)
#49412
PDF page: 129

looks like the line:

chad> rake migrate

should actually be:

chad> rake db:migrate--William E Den Beste

  • Reported in: P1.1 (11-Apr-12)
#49101
PDF page: 133

Search for "object>", with a spurious greater than ">".--Xavier Noria

  • Reported in: P1.1 (22-Apr-12)
#49175
PDF page: 138

Change Formtatstic -> Formtastic in "Adding Formtatstic to our Rails application is easy."--Ben Taitelbaum

  • Reported in: P1.1 (22-Apr-12)
#49176
PDF page: 140
"If we change the attribute to type="email", we end up with a space bar broken into three buttons: the space bar, the @ symbol, and a period. Any emai...more...
  • Reported in: P1.1 (11-Apr-12)
#49098
PDF page: 150
Paper page: 138

<%= f.buttons %> should be <%= f.actions %> with formtastic (2.2.0)--Romeo Giezendanner

  • Reported in: P1.1 (12-Sep-12)
#49800
PDF page: 163
Paper page: 0
various problems with the code for the mobile chapter: 1. redirect_mobile in PagesController should redirect to project_creations_path instead of c...more...
  • Reported in: P1.1 (23-Aug-12)
#49730
PDF page: 164
In Section 7.1, it reads: "When we set it up in Chapter 1, Creating an Application Layout, on page 1, the page wrapper was 960 pixels wide, the ...more...
  • Reported in: P1.1 (12-Sep-12)
#49798
PDF page: 175
Paper page: 0

The mime_type :mobile may not be needed when mobile-fu is used later in the chapter.--William Ko

  • Reported in: P1.1 (12-Sep-12)
#49799
PDF page: 179
Paper page: 0
mobile-fu does not work properly with jquery-mobile without further customization: Workaround: Step 1: add the following before_filter to Applic...more...
  • Reported in: P1.1 (25-Sep-12)
#49863
PDF page: 184
I am using the ebook version, so it's 184 of 6628 (3%). In the first paragraph under the heading 'HTML5 and Semantic Markup', there is a stray comma a...more...
  • Reported in: P1.1 (13-Apr-12)
#49104
PDF page: 190

The Link in footnote 13. should be: github.com/benlangfeld/mobile-fu--Romeo Giezendanner

  • Reported in: P1.0 (28-Mar-12)
#49003
PDF page: 192
You state that "Since jQuery Mobile includes a style sheet and images, we need to tell Rails to serve them as well. We do that with a couple of pro...more...
Bruce Williams says: Thanks for this -- excellent catch. This is a larger edit ('provide' is mentioned in a couple places), and should definitely be fixed.
  • Reported in: P1.1 (13-Apr-12)
#49105
PDF page: 192

The file: vendor/assets/javascripts/jquery.mobile.js should be: app/assets/javascripts/jquery.mobile.js--Romeo Giezendanner

  • Reported in: P1.1 (19-Sep-12)
#49823
PDF page: 207
assorted issues with Chapter 9 (vanity, deadweight) page 209: collecting should be set to true for development to observe meaningful results p...more...

Stuff To Be Considered in the Next Edition

  • Reported in: P1.0 (30-Mar-12)
#49036
PDF page: 10
I would think an explanation of the options you chose for modernizr would help people understand what is going on. I went to the modernizr download b...more...
John M Athayde says: Wrote this on the blog. Will consider adding a similar explanation into the text for the next major revision: http://www.therailsview.com/2012/04/modernizr-why-we-do-the-config-we-do/
  • Reported in: P1.0 (05-Apr-12)
#49065
PDF page: 107
In reorganizing the book in tech review, the JS chapter now occurs before the forms chapter. This causes the formtastic form to be made into a javascr...more...