我的部分被渲染两次:在页面的顶部和它应该的地方.显然,只有当我有特定于ActiveAdmin的代码(table_for)时才会发生这种情况.
任何帮助是极大的赞赏.以下是我正在使用的一些代码片段.
在我的活动管理文件中:
panel "Children - SubProcesses" do
text_node link_to "New", new_admin_sub_process_node_path(:parent_id => process_node.id)
div render :partial => "/admin/process_nodes/child_list", :locals => { :parent => process_node }
end
Run Code Online (Sandbox Code Playgroud)
在_child_list.html.erb文件中
<%=
unless parent.children.empty?
table_for parent.children do
column :id
column :name
column "Actions" do |child_node|
text_node link_to "View", admin_process_node_path(child_node)
text_node " "
text_node link_to "Edit", edit_admin_process_node_path(child_node)
text_node " "
text_node link_to "Delete", admin_process_node_path(child_node), :method => :delete, :confirm => "Delete?"
end
end
end
%>
Run Code Online (Sandbox Code Playgroud) 无处不在,并且没有改变任何东西,我开始得到这个错误(团队中的其他人也是如此).
这种情况发生在一些宝石(指定git分支的宝石)上,并且只在我们重新创建环境时(在vagrant中)才会发生.我们没有改变任何事情.
有任何想法吗?更多信息如下:
Using active_utils (2.0.0) from git://github.com/Shopify/active_utils.git (at v2.0.0)
NoMethodError: undefined method `spec' for nil:NilClass
An error occurred while installing active_utils (2.0.0), and Bundler cannot continue.
Make sure that `gem install active_utils -v '2.0.0'` succeeds before bundling.
Using factory_girl (2.6.5) from https://github.com/thoughtbot/factory_girl (at 2.6.x)
NoMethodError: undefined method `spec' for nil:NilClass
An error occurred while installing factory_girl (2.6.5), and Bundler cannot continue.
Make sure that `gem install factory_girl -v '2.6.5'` succeeds before bundling.
Run Code Online (Sandbox Code Playgroud)
好像它是Gemfile中的所有条目,指定一个开始失败的分支.
gem …Run Code Online (Sandbox Code Playgroud)