Errors when Generating Devise Views
I am developing a rails 3 application and I am using Devise for authentication. Everything seems to be working just fine, but when I try to generate the views using rails generate devise:views, I get a bunch of errors like this:
/Library/Ruby/Gems/1.8/gems/bundler-1.0.2/lib/bundler/shared_helpers.rb:2:in `require': no such file to load -- rubygems (LoadError)
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.2/lib/bundler/shared_helpers.rb:2
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.2/lib/bundler/setup.rb:1:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.2/lib开发者_运维问答/bundler/setup.rb:1
My default template engine is HAMl and I have the hpricot gem installed (as it says to do on the Devise github page).
Any ideas?
Thanks
Give it a shot with bundle exec
:
bundle exec rails g devise:views
It turns out that it had something to do with my gems being stored in a different location than ruby. I'm not sure why it suddenly became a problem with that particular command. But re-installing rubygems seemed to do the trick.
精彩评论