Ruby on rails 活动管理未定义方法';修补程序';。与routes.rb冲突

Ruby on rails 活动管理未定义方法';修补程序';。与routes.rb冲突,ruby-on-rails,ruby,routes,activeadmin,roles,Ruby On Rails,Ruby,Routes,Activeadmin,Roles,我正在使用ruby-2.1.1、gem和 当我尝试安装active_admin时,使用 rails generate active_admin:install 我有以下错误: .../config/routes.rb:25:in `block (3 levels) in <top (required)>': undefined method `patch' for ActionDispatch::Routing::Mapper:0x000000073516d0 (NoMetho

我正在使用ruby-2.1.1、gem和

当我尝试安装active_admin时,使用

rails generate active_admin:install 
我有以下错误:

.../config/routes.rb:25:in `block (3 levels) in <top (required)>': undefined 
method `patch' for ActionDispatch::Routing::Mapper:0x000000073516d0 (NoMethodError)
如果我替换patch=>put,我在gem中遇到了另一个错误:

...rvm/gems/ruby-2.1.1/gems/the_role-2.3/config/routes.rb:4:in`block(3个级别)
in':未定义的方法“patch”
对于#(命名者)
如何安装Active\u admin?
提前谢谢

您是否尝试使用
match
代替
put
patch
?类似于
match'/leads/update',通过::patch
,“leads\u controller\update”,因为
ActionDispatch::Routing
没有像
patch
put
或“get”这样的方法。在我尝试安装active\u admin之前,所有路由都工作得很好。我发现,当我使用actionpack(4.0.3)时,活动管理员需要actionpack(~>3.0.0.rc2)。我认为问题与此依赖性有关如果是依赖性问题,请尝试使用
gem'activeadmin',github'gregbell/active\u admin'
。谢谢你,Josh。存在依赖性问题,请将您的评论作为答案发布,我将其标记为正确
namespace :api, defaults: {format: 'json'} do
    scope module: :v1, constraints: ApiConstraints.new(version: 1) do
      resources :leads
    end
    scope module: :v2, constraints: ApiConstraints.new(version: 2, default: true) do
      resources :leads
      patch '/leads/update' => 'leads_controller#update', as: 'update_leads'
    end
  end
.../.rvm/gems/ruby-2.1.1/gems/the_role-2.3/config/routes.rb:4:in `block (3 levels) 
in <top (required)>': undefined method `patch' 
for #<ActionDispatch::Routing::Mapper:0x0000000850e990> (NoMethodError)