I tried to create a User model with the application (while in my application I had no problem creating models or adding attributes). I launched
rails g devise user
What creates this:
invoke active_record create db/migrate/20140930235224_devise_create_users.rb create app/models/user.rb invoke test_unit create test/models/user_test.rb create test/fixtures/users.yml insert app/models/user.rb route devise_for :users
Then i try to run
rake db:migrate
Which gives me the following
rake aborted! NoMethodError: undefined method `merge!' for #<ActionDispatch::Routing::Mapper::Scope:0x9fc73a4> /home/user/Desktop/MyApp/config/routes.rb:2:in `block in <top (required)>' /home/user/Desktop/MyApp/config/routes.rb:1:in `<top (required)>' /home/user/Desktop/MyApp/config/environment.rb:5:in `<top (required)>' Tasks: TOP => db:migrate => environment (See full trace by running task with --trace)
What could be the problem?
Line 2 for routes:
devise_for :users
And line 5 for the environment:
Rails.application.initialize!
source share