0

I took the following steps:

rails new routing_test

  • in Gemfile I added devise
  • rails devise g user invoke active_record

    create    db/migrate/20130731191051_devise_create_users.rb
    create    app/models/user.rb
    invoke    rspec
    create      spec/models/user_spec.rb
    invoke      factory_girl
    create        spec/factories/users.rb
    insert    app/models/user.rb
    route  devise_for :users
    

and then, with a simple rake db:migrate, I get the following:

rake aborted!

Rails::Application::RoutesReloader#execute_if_updated delegated to updater.execute_if_updated, but updater is nil: #<Rails::Application::RoutesReloader:0x007feb823b6120 @paths=["/Users/krg07/Developer/core2/test/dummy/config/routes.rb", "/Users/krg07/Developer/core2/config/routes.rb"], @route_sets=[#<ActionDispatch::Routing::RouteSet:0x007feb82c5e700>, #<ActionDispatch::Routing::RouteSet:0x007feb82d34440>]>
/Users/krg07/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:10:in `rescue in execute_if_updated'
/Users/krg07/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:6:in `execute_if_updated'
/Users/krg07/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'

Any idea what is going on? Thanks, really appreciate it!

Karan
  • 14,824
  • 24
  • 91
  • 157
  • 1
    Did you run `rails g devise:install` first? Also, try to lock version of devise: `gem 'devise', '~> 3.0.1'` – j03w Aug 04 '13 at 13:39
  • that was it! if you add it as an answer, i'll gladly accept it ;) – Karan Aug 04 '13 at 13:42
  • Don't really know how to paraphrase it to a proper answer… also @Dhaulagiri got it almost exactly right too, so perhaps edit his answer? Also, it would be great if could go and close the ticket on Github. – j03w Aug 05 '13 at 02:58

2 Answers2

3

I had problems getting Devise to work with Rails 4 and found that most of the issues were because I was including an older version of the gem that was not updated to work with Rails 4. Specifying the latest version of the gem helped:

gem 'devise', '3.0.0'

You may need to re-run the Devise installer after the gem has been updated.

Dhaulagiri
  • 3,281
  • 24
  • 26
1

You are not the only one to have this problem, see the following issue for more informations.

Jeremy
  • 167
  • 4
  • yeah ... I've been reading it. Seems that it has been fixed in the edge version, but I still get an error (different one on the edge version) – Karan Jul 31 '13 at 19:30