What the heck?
This book is driving me crazy. I keep getting syntax errors. I've done what the book says and I keep getting this:
undefined method `screen_name=' for #
I don't understand what I'm doing wrong. If anyone knows please let me know, I've stared at code for 3 hours now and I'm getting a huge head ache from this.
Posted 10 months ago
Seems like you haven't defined your model correctly - perhaps you haven't run the migration that allows Rails to know that a user has a screen name.
Hey.. just testing this...
I'm going nuts trying to figure this one out:
I'm having trouble with being able to update an email address or change a password. I keep getting the following error:
===================== NoMethodError in UserController#edit undefined method
try_to_update' for # RAILS_ROOT: ./script/../config/.. #{RAILS_ROOT}/app/controllers/user_controller.rb:60:inedit' Request Parameters: {"user"=>{"email"=>"foo@bar.com"}, "commit"=>"Update", "attribute"=>"email"} Response Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"} =====================I've been staring at this for quite some time and haven't been able to figure it out. What am I missing? Thanks!
I had this problem too (the "screenname" one). The problem was that the migration in the book was updated via listing 3.3. But it never actually says (rake back to 0 and then rake the migration). The db has already been built (with no screenname), so if you updated the migration, ruby still thinks it is on version 1 and so doesn't reflect the listing. So if you rake back to verion 0 and then rake, it should work. (It worked for me at least.)