错误消息:
ArgumentError: Invalid route name, already in use: 'new_user_session'
You may have defined two routes with the same name using the
:as option, or you maybe overriding a route already defined by a resource with the same naming.
这是我的路线。rb
root 'static_pages#launch'
get "/demo" => "static_pages#home", via: "get"
mount RailsAdmin::Engine => '/admin', :as => 'rails_admin'
mount Ckeditor::Engine => '/ckeditor'
resources :contact_forms
devise_for :users , controllers: { omniauth_callbacks: "users/omniauth_callbacks"}
match '/del_google_calendar_alert', to:'set_alerts#remove_google_calendar_alert', via: 'get'
get "users/preferences"
resources :events do #, shallow: true
put :favorite, on: :member
put :followfeed, on: :member
put :share, on: :member
put :submit, on: :member
end
resources :campuses do
resources :groups
end
resources :users, except: [:create] do
member do
get :following, :followers
end
end
resources :microposts, :only => [:create, :destroy]
resources :relationships, :only => [:create, :destroy]
rake路由在本地计算机中未显示错误,但在ec2计算机中部署时抛出错误。
我尝试在两台机器上使用相同版本的devise,但仍然没有成功。
rake routes
在我的本地计算机上
root GET / static_pages#launch
demo GET /demo(.:format) static_pages#home
rails_admin /admin RailsAdmin::Engine
ckeditor /ckeditor Ckeditor::Engine
letter_opener_web /letter_opener LetterOpenerWeb::Engine
contact_forms GET /contact_forms(.:format) contact_forms#index
POST /contact_forms(.:format) contact_forms#create
new_contact_form GET /contact_forms/new(.:format) contact_forms#new
edit_contact_form GET /contact_forms/:id/edit(.:format) contact_forms#edit
contact_form GET /contact_forms/:id(.:format) contact_forms#show
PATCH /contact_forms/:id(.:format) contact_forms#update
PUT /contact_forms/:id(.:format) contact_forms#update
DELETE /contact_forms/:id(.:format) contact_forms#destroy
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
user_omniauth_authorize GET|POST /users/auth/:provider(.:format) users/omniauth_callbacks#passthru {:provider=>/facebook|twitter|linkedin|github|google_oauth2/}
user_omniauth_callback GET|POST /users/auth/:action/callback(.:format) users/omniauth_callbacks#(?-mix:facebook|twitter|linkedin|github|google_oauth2)
user_password POST /users/password(.:format) devise/passwords#create
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
PATCH /users/password(.:format) devise/passwords#update
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
user_registration POST /users(.:format) devise/registrations#create
new_user_registration GET /users/sign_up(.:format) devise/registrations#new
edit_user_registration GET /users/edit(.:format) devise/registrations#edit
PATCH /users(.:format) devise/registrations#update
PUT /users(.:format) devise/registrations#update
DELETE /users(.:format) devise/registrations#destroy
user_confirmation POST /users/confirmation(.:format) devise/confirmations#create
new_user_confirmation GET /users/confirmation/new(.:format) devise/confirmations#new
GET /users/confirmation(.:format) devise/confirmations#show
del_google_calendar_alert GET /del_google_calendar_alert(.:format) set_alerts#remove_google_calendar_alert
del_fb_alert DELETE /del_fb_alert(.:format) set_alerts#remove_fb_alert
set_fb_alert GET /set_fb_alert(.:format) set_alerts#set_fb_alert
set_google_calendar_alert GET /set_google_calendar_alert(.:format) set_alerts#set_google_calendar_alert
refresh GET /refresh(.:format) refresh#index
delfb DELETE /delfb(.:format) set_alerts#remove_fb_alert
sort GET /sort(.:format) refresh#by_date
search GET /search(.:format) refresh#search
myevents GET /myevents(.:format) refresh#myevents
hall GET /hall(.:format) refresh#hallevents
all_campus GET /all_campus(.:format) refresh#campusevents
approvals GET /approvals(.:format) admin#index
approve GET /approve(.:format) admin#update
users_preferences GET /users/preferences(.:format) users#preferences
favorite_event PUT /events/:id/favorite(.:format) events#favorite
followfeed_event PUT /events/:id/followfeed(.:format) events#followfeed
share_event PUT /events/:id/share(.:format) events#share
submit_event PUT /events/:id/submit(.:format) events#submit
events GET /events(.:format) events#index
POST /events(.:format) events#create
new_event GET /events/new(.:format) events#new
edit_event GET /events/:id/edit(.:format) events#edit
event GET /events/:id(.:format) events#show
PATCH /events/:id(.:format) events#update
PUT /events/:id(.:format) events#update
DELETE /events/:id(.:format) events#destroy
campus_groups GET /campuses/:campus_id/groups(.:format) groups#index
POST /campuses/:campus_id/groups(.:format) groups#create
new_campus_group GET /campuses/:campus_id/groups/new(.:format) groups#new
edit_campus_group GET /campuses/:campus_id/groups/:id/edit(.:format) groups#edit
campus_group GET /campuses/:campus_id/groups/:id(.:format) groups#show
PATCH /campuses/:campus_id/groups/:id(.:format) groups#update
PUT /campuses/:campus_id/groups/:id(.:format) groups#update
DELETE /campuses/:campus_id/groups/:id(.:format) groups#destroy
campuses GET /campuses(.:format) campuses#index
POST /campuses(.:format) campuses#create
new_campus GET /campuses/new(.:format) campuses#new
edit_campus GET /campuses/:id/edit(.:format) campuses#edit
campus GET /campuses/:id(.:format) campuses#show
PATCH /campuses/:id(.:format) campuses#update
PUT /campuses/:id(.:format) campuses#update
DELETE /campuses/:id(.:format) campuses#destroy
following_user GET /users/:id/following(.:format) users#following
followers_user GET /users/:id/followers(.:format) users#followers
users GET /users(.:format) users#index
new_user GET /users/new(.:format) users#new
edit_user GET /users/:id/edit(.:format) users#edit
user GET /users/:id(.:format) users#show
PATCH /users/:id(.:format) users#update
PUT /users/:id(.:format) users#update
DELETE /users/:id(.:format) users#destroy
microposts POST /microposts(.:format) microposts#create
micropost DELETE /microposts/:id(.:format) microposts#destroy
relationships POST /relationships(.:format) relationships#create
relationship DELETE /relationships/:id(.:format) relationships#destroy
help GET /help(.:format) static_pages#help
new_events GET /new_events(.:format) static_pages#new_events
about GET /about(.:format) static_pages#about
contact GET /contact(.:format) static_pages#contact
team GET /team(.:format) static_pages#team
faq GET /faq(.:format) static_pages#faq
our_works GET /our_works(.:format) static_pages#our_works
patnerships GET /patnerships(.:format) static_pages#patnerships`
我也已经签出了这篇文章,但到目前为止没有成功。 Rails 4 + Devise: Invalid route name, already in use
更新:
rake route --trace帮助我找出了问题所在。
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:434:in `add_route'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1445:in `add_route'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1422:in `decomposed_match'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1420:in `block in decomposed_match'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1311:in `block (2 levels) in member'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:723:in `scope'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1310:in `block in member'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1540:in `with_scope_level'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1309:in `member'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1420:in `decomposed_match'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1403:in `block in match'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1394:in `each'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1394:in `match'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:601:in `map_method'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:562:in `get'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/lib/devise/rails/routes.rb:347:in `block in devise_session'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1092:in `block in resource'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1549:in `block (2 levels) in resource_scope'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:723:in `scope'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1548:in `block in resource_scope'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1540:in `with_scope_level'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1547:in `resource_scope'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1091:in `resource'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/lib/devise/rails/routes.rb:346:in `devise_session'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/lib/devise/rails/routes.rb:236:in `block (4 levels) in devise_for'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/lib/devise/rails/routes.rb:236:in `each'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/lib/devise/rails/routes.rb:236:in `block (3 levels) in devise_for'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/lib/devise/rails/routes.rb:441:in `with_devise_exclusive_scope'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/lib/devise/rails/routes.rb:235:in `block (2 levels) in devise_for'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/lib/devise/rails/routes.rb:338:in `block in devise_scope'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:840:in `block in constraints'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:723:in `scope'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:840:in `constraints'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/lib/devise/rails/routes.rb:337:in `devise_scope'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/lib/devise/rails/routes.rb:234:in `block in devise_for'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/lib/devise/rails/routes.rb:217:in `each'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/lib/devise/rails/routes.rb:217:in `devise_for'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/google_authentication-0.3.0/config/routes.rb:5:in `block in <top (required)>'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:341:in `instance_exec'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:341:in `eval_block'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:319:in `draw'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/google_authentication-0.3.0/config/routes.rb:1:in `<top (required)>'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `block in load'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in `each'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in `load_paths'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:16:in `reload!'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:26:in `block in updater'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/file_update_checker.rb:75:in `call'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/file_update_checker.rb:75:in `execute'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:27:in `updater'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:6:in `execute_if_updated'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `each'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `call'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
/var/www/new_push/config/environment.rb:5:in `<top (required)>'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/application.rb:189:in `require_environment!'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/application.rb:250:in `block in run_tasks_blocks'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rake/task.rb:236:in `call'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rake/task.rb:236:in `block in execute'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rake/task.rb:231:in `each'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rake/task.rb:231:in `execute'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rake/task.rb:175:in `block in invoke_with_call_chain'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rake/task.rb:168:in `invoke_with_call_chain'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rake/task.rb:197:in `block in invoke_prerequisites'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rake/task.rb:195:in `each'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rake/task.rb:195:in `invoke_prerequisites'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rake/task.rb:174:in `block in invoke_with_call_chain'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rake/task.rb:168:in `invoke_with_call_chain'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rake/task.rb:161:in `invoke'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rake/application.rb:149:in `invoke_task'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rake/application.rb:106:in `block (2 levels) in top_level'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rake/application.rb:106:in `each'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rake/application.rb:106:in `block in top_level'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rake/application.rb:115:in `run_with_threads'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rake/application.rb:100:in `top_level'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rake/application.rb:78:in `block in run'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rake/application.rb:165:in `standard_exception_handling'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rake/application.rb:75:in `run'
/home/ubuntu/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.1.0/bin/rake:33:in `<top (required)>'
/home/ubuntu/.rbenv/versions/2.1.0/bin/rake:23:in `load'
/home/ubuntu/.rbenv/versions/2.1.0/bin/rake:23:in `<main>'
供进一步参考,在devise_for中使用“ as”选项可能很方便。
devise_for :users , as: "unique_prefix", controllers: { omniauth_callbacks: "users/omniauth_callbacks"}