【问题标题】:Active admin Error! I don't have views folder found活动管理员错误!我没有找到视图文件夹
【发布时间】:2014-12-10 14:37:29
【问题描述】:

第一次使用active-admin。我只是按照railscast的教程。在我安装了 active-admin 和一些配置之后,导航到“localhost:3000/admin”.. 我遇到了一些错误。

这是错误。

ArgumentError in ActiveAdmin::Devise::Sessions#new

Showing /home/eebasadre20/.rvm/gems/ruby-2.1.2/bundler/gems/active_admin-fc1874f7d3b4/app/views/active_admin/devise/sessions/new.html.erb where line #5 raised:

wrong number of arguments (3 for 2)**strong text**

我不知道视图的位置。在我的视图文件夹中,只有 layouts 文件夹存在。

<h2><%= render_or_call_method_or_proc_on(self, active_admin_application.site_title) %> <%= title t('active_admin.devise.login.title') %></h2>

    <% scope = Devise::Mapping.find_scope!(resource_name) %>
    <%= active_admin_form_for(resource, as: resource_name, url: send(:"#{scope}_session_path"), html: { id: "session_new" }) do |f|
      f.inputs do
        resource.class.authentication_keys.each_with_index { |key, index|
          f.input key, label: t('active_admin.devise.'+key.to_s+'.title'), input_html: { autofocus: index.zero? }

谢谢!

【问题讨论】:

    标签: ruby-on-rails ruby ruby-on-rails-4 gem activeadmin


    【解决方案1】:

    该问题的常见解决方案是

    • Gemfile 中删除gem 'meta_search'

    • Gemfile 中删除gem 'meta_search'
    • gem "formtastic", github: "justinfrench/formtastic" 添加到 Gemfile

    【讨论】:

    • 非常感谢先生的解决方案。有用。 :)
    • 啊!谢谢你的提醒。我是stackoverflow的新手。 :)
    • @Pepeng 你也可以投票/反对任何其他问题/答案
    猜你喜欢
    • 2013-04-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-03-14
    • 2015-04-28
    • 2015-11-07
    • 2012-09-01
    • 1970-01-01
    相关资源
    最近更新 更多