small medium large xlarge

Robkelley_200x200_pragsmall
05 Feb 2010, 22:32
Rob Kelley (2 posts)

I’m getting an error when I try to run the command listed at the top of Chapter 11. Administration:

ruby script/generate scaffold \ user name:string hashed_password:string salt:string

Error:

wrong constant name usersHelper

Any clue what’s going wrong or how to troubleshoot?

Rob

Samr_small_pragsmall
05 Feb 2010, 22:41
Sam Ruby (634 posts)

You need to either put in the backslash or put it all on one line.

A backslash at the end of the line is a continuation. A backslash anyplace else means to treat the next character as part of a parameter. By doing both, rails is passed “ user” as the name of the model, and is attempting to create a “ usersHelper” (if you look closely, you will see two spaces in the error message). Admittedly, Rails error message could be a bit friendlier, but if you simply drop the backslash, you should be good to go.

Robkelley_200x200_pragsmall
05 Feb 2010, 22:58
Rob Kelley (2 posts)

Removing the backslash worked.

Well, that solves two questions. I was wondering what that backslash was supposed to signify :)

Thanks Sam!

Rob

You must be logged in to comment