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
Wen Yu Wang
13,749 Points( rails 4.1.2 , OS X 10.9.4) Not as expected when I type "rails console" and "rails generate devise:views"
When running " rails console" in the terminal, I got:
/Users/mac/.rvm/gems/ruby-2.1.2/gems/devise-3.3.0/lib/devise/models.rb:88:in const_get': uninitialized constant Devise::Models::ProfileName (NameError)
from /Users/mac/.rvm/gems/ruby-2.1.2/gems/devise-3.3.0/lib/devise/models.rb:88:inblock (2 levels) in devise'
...........
And I also got the same error when running "rails generate devise:views ".
What does the error mean ?
Thank you !
1 Answer
Maciej Czuchnowski
36,441 PointsJust to make sure the foundations are covered:
1) you have gem 'devise' in your gemfile?
2) did you run bundle install successfully?
3) did you run rails generate devise:install successfully?
Wen Yu Wang
13,749 PointsWen Yu Wang
13,749 PointsThank you Maciej ! I have <strong> gem 'devise' </strong> in my gem file. I ran<strong> bundle install </strong> successfully but the third one failed.
The error message is the same as before :
/Users/mac/.rvm/gems/ruby-2.1.2/gems/devise-3.3.0/lib/devise/models.rb:88:in
const_get': uninitialized constant Devise::Models::ProfileName (NameError) from /Users/mac/.rvm/gems/ruby-2.1.2/gems/devise-3.3.0/lib/devise/models.rb:88:inblock (2 levels) in devise' from /Users/mac/.rvm/gems/ruby-2.1.2/gems/devise-3.3.0/lib/devise/models.rb:87:in `each'Do you know how I can fix the problem ? Thank you !