Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Generating the Devise Views user.rb causing console problem

C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/lib/ac tive_support/dependencies.rb:469:in `load': C:/Projects/treebook/app/models/user .rb:10: syntax error, unexpected ',', expecting keyword_end (SyntaxError) ----------------:first_name, :last_name, :profile_name ^

Is what I'm looking at. I more or less understand where the problem is but I don't see how what I put into my user.rb is any different than the lesson.

3 Answers

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Hey Kris, can you paste your user.rb file here?

class User < ActiveRecord::Base # Include default devise modules. Others available are: # :token_authenticatable, :confirmable, # :lockable, :timeoutable and :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable

# Setup accessible (or protected) attributes for your model attr_accessible :email, :password, :password_confirmation, :remember_me :first_name, :last_name, :profile_name # attr_accessible :title, :body end

It was the spacing between what was already there and what I needed to add. I put :first_name, :last_name, :profile_name on the same line as :email, :password, :password_confirmation, :remember_me and now the console loads.

I guess the problem was caused by the lack of a comma between :remember_me & :first_name,