I think I've found a mistake in Rails tutorial

At the point of this section

http://ruby.railstutorial.org/chapters/sign-up#sec-signup_failure

clicking the “Create my account” button on the signup form shows the following image at

According to the tutorial, I must modify these files to rid myself of the error.

  • app/controllers/users_controller.rb
  • app/views/users/new.html.erb
  • app/views/shared/_error_messages.html.erb
  • app/assets/stylesheets/custom.css.scss I made all the modifications (until I saw the working image to the 4 files), and I still get the error image above when submitting the file, rather than a page that shows me that I left the fields blank.

Can you help with this?

Please don't use images, copy/paste the error and short segments of code here. First make sure you have checked the values of any variables (params for example) by checking the values passed in log/development.log and using puts to print values into the server window.

Are you using exactly the versions of ruby, rails and gems expected by the tutorial?

Colin

There is no params as I am just clicking a Signup button that’s on a page, then the error shows up.

I’m using Ruby 1.9.3 and the latest versions of sass-rails and coffee-rails.

There is no params as I am just clicking a Signup button that’s on a page, then the error shows up.

I’m using Ruby 1.9.3 and the latest versions of sass-rails and coffee-rails.

development.log says this

One should not claim a tutorial is broken before finishing it, because clearly further down: http://ruby.railstutorial.org/chapters/sign-up#sec-strong_parameters

To add since I neglected to mention it like I should have, just because your form is blank does not mean there are no params, blank or not it will create a param as the form still sends the fields, that is why you see them listed there with "". "" is not a null value, it is an empty value, empty != null, nil == null because even a blank value is a value to all systems. This is why Rails has .blank? and .present? so you can work around this situation, but tbh you should not need to as after you permit them and then pass them into the model it should have already done a validator stating that you do not wish it to be blank or null.

Thanks for your help. It turns out I missed something out. (Figure 7:22)