0
我想用activeadmin,當我訪問URL /管理未定義的方法`new_password_path」與activeadmin
NoMethodError in ActiveAdmin::Devise::Sessions#new
undefined method `new_password_path' for #<#<Class:0x0000000712b248>:0x00000006c8f900>
<% end -%>
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
<%= link_to t('active_admin.devise.links.forgot_your_password'), new_password_path(resource_name) %><br /> #this line is highlighted
<% end -%>
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
Trace of template inclusion: /var/www/htdocs/web99/.gem/bundler/gems/active_admin-1930da57a656/app/views/active_admin/devise/sessions/new.html.erb
請注意,這不是我的代碼我收到此錯誤信息,但他們,所以我不能修改它。 我的Gemfile:
source 'https://rubygems.org'
ruby '1.9.3'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0'
gem 'execjs'
gem 'therubyracer'
gem 'activeadmin', github: 'gregbell/active_admin'
# Use mysql as the database for Active Record
gem 'mysql2'
gem 'mysql'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
我的routes.rb:
Itdm::Application.routes.draw do
devise_for :admin_users, ActiveAdmin::Devise.config
ActiveAdmin.routes(self)
end