ruby - How do I set up user authentication using devise and Rails 4? -


i'm trying user authentication devise working, , failing.

i tried following steps in railsgirls article, after creating simple new project, adding gem 'devise' , running bundle install, when run rails generate devise:install screenful of errors starting

error:get available generators script executes errors: error:c:/railsinstaller/ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-4.1.1/lib/active_record/dynamic_matchers.rb:26:in `method_missing': undefined method `devise' user (call 'user.connection' establish connection):class (nomethoderror) 

has idea might doing wrong? (i tried using instructions in devise wiki, couldn't working way either).

i ran same problem today, it's because tried generate model before tried install devise self

stash ( or remove ) changes user model , migration file, run this

rails generate devise:install 

after unstash , apply migration, should work fine.


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -