我刚刚升级到Rails 4-1-1,我在主动管理员方面遇到了一些问题。我收到此错误:
ArgumentError - wrong number of arguments (5 for 4):
formtastic (2.3.0.rc2) lib/formtastic/form_builder.rb:85:in `initialize'
这里是完整的错误代码:
Started GET "/admin/login" for 127.0.0.1 at 2014-04-03 18:14:36 +0200
Processing by ActiveAdmin::Devise::SessionsController#new as HTML
Rendered /Users/aljazfajmut/.bundler/ruby/2.0.0/active_admin-ee996b09edb9/app/views/active_admin/devise/sessions/new.html.erb within layouts/active_admin_logged_out (5.2ms)
Completed 500 Internal Server Error in 21ms
ArgumentError - wrong number of arguments (5 for 4):
formtastic (2.3.0.rc2) lib/formtastic/form_builder.rb:85:in `initialize'
/Users/aljazfajmut/.bundler/ruby/2.0.0/active_admin-ee996b09edb9/lib/active_admin/form_builder.rb:15:in `initialize'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionview/lib/action_view/helpers/form_helper.rb:1146:in `instantiate_builder'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionview/lib/action_view/helpers/form_helper.rb:433:in `form_for'
formtastic (2.3.0.rc2) lib/formtastic/helpers/form_helper.rb:167:in `block in semantic_form_for'
formtastic (2.3.0.rc2) lib/formtastic/helpers/form_helper.rb:190:in `with_custom_field_error_proc'
formtastic (2.3.0.rc2) lib/formtastic/helpers/form_helper.rb:166:in `semantic_form_for'
/Users/aljazfajmut/.bundler/ruby/2.0.0/active_admin-ee996b09edb9/lib/active_admin/view_helpers/form_helper.rb:9:in `active_admin_form_for'
/Users/aljazfajmut/.bundler/ruby/2.0.0/active_admin-ee996b09edb9/app/views/active_admin/devise/sessions/new.html.erb:5:in `___sers_aljazfajmut__bundler_ruby_______active_admin_ee___b__edb__app_views_active_admin_devise_sessions_new_html_erb__1960339914767360192_70243798002100'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionview/lib/action_view/template.rb:145:in `block in render'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/notifications.rb:159:in `block in instrument'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/notifications.rb:159:in `instrument'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionview/lib/action_view/template.rb:339:in `instrument'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionview/lib/action_view/template.rb:143:in `render'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionview/lib/action_view/renderer/template_renderer.rb:55:in `block (2 levels) in render_template'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionview/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/notifications.rb:159:in `block in instrument'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/notifications.rb:159:in `instrument'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionview/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionview/lib/action_view/renderer/template_renderer.rb:54:in `block in render_template'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionview/lib/action_view/renderer/template_renderer.rb:62:in `render_with_layout'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionview/lib/action_view/renderer/template_renderer.rb:53:in `render_template'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionview/lib/action_view/renderer/template_renderer.rb:17:in `render'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionview/lib/action_view/renderer/renderer.rb:42:in `render_template'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionview/lib/action_view/renderer/renderer.rb:23:in `render'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionview/lib/action_view/rendering.rb:99:in `_render_template'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal/streaming.rb:217:in `_render_template'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionview/lib/action_view/rendering.rb:82:in `render_to_body'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal/rendering.rb:32:in `render_to_body'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal/renderers.rb:32:in `render_to_body'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/abstract_controller/rendering.rb:25:in `render'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal/rendering.rb:16:in `render'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal/instrumentation.rb:41:in `block (2 levels) in render'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/core_ext/benchmark.rb:12:in `ms'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal/instrumentation.rb:41:in `block in render'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activerecord/lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `render'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal/responder.rb:238:in `default_render'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal/responder.rb:165:in `to_html'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal/responder.rb:158:in `respond'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal/responder.rb:151:in `call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal/mime_responds.rb:400:in `respond_with'
/Users/aljazfajmut/.bundler/ruby/2.0.0/devise-602778793022/app/controllers/devise/sessions_controller.rb:10:in `new'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/abstract_controller/base.rb:189:in `process_action'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal/rendering.rb:10:in `process_action'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/callbacks.rb:113:in `call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/callbacks.rb:229:in `block in halting'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/callbacks.rb:166:in `block in halting'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/callbacks.rb:166:in `block in halting'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/callbacks.rb:166:in `block in halting'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/callbacks.rb:86:in `run_callbacks'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/abstract_controller/callbacks.rb:19:in `process_action'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal/rescue.rb:29:in `process_action'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/notifications.rb:159:in `block in instrument'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/notifications.rb:159:in `instrument'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activerecord/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/abstract_controller/base.rb:136:in `process'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionview/lib/action_view/rendering.rb:30:in `process'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal.rb:195:in `dispatch'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_controller/metal.rb:231:in `block in action'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_dispatch/routing/route_set.rb:48:in `call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_dispatch/routing/mapper.rb:45:in `call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_dispatch/journey/router.rb:71:in `block in call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_dispatch/journey/router.rb:59:in `call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_dispatch/routing/route_set.rb:676:in `call'
newrelic_rpm (3.6.7.159) lib/new_relic/rack/error_collector.rb:43:in `call'
newrelic_rpm (3.6.7.159) lib/new_relic/rack/error_collector.rb:43:in `call'
newrelic_rpm (3.6.7.159) lib/new_relic/rack/agent_hooks.rb:22:in `call'
newrelic_rpm (3.6.7.159) lib/new_relic/rack/browser_monitoring.rb:16:in `call'
newrelic_rpm (3.6.7.159) lib/new_relic/rack/developer_mode.rb:28:in `call'
mixpanel (4.0.8) lib/mixpanel/middleware.rb:29:in `call'
warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
warden (1.2.3) lib/warden/manager.rb:34:in `call'
rack (1.5.2) lib/rack/etag.rb:23:in `call'
rack (1.5.2) lib/rack/conditionalget.rb:25:in `call'
rack (1.5.2) lib/rack/head.rb:11:in `call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_dispatch/middleware/flash.rb:254:in `call'
rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_dispatch/middleware/cookies.rb:560:in `call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activerecord/lib/active_record/query_cache.rb:36:in `call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/callbacks.rb:82:in `run_callbacks'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_dispatch/middleware/reloader.rb:73:in `call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
better_errors (1.0.1) lib/better_errors/middleware.rb:84:in `protected_app_call'
better_errors (1.0.1) lib/better_errors/middleware.rb:79:in `better_errors_call'
better_errors (1.0.1) lib/better_errors/middleware.rb:56:in `call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/railties/lib/rails/rack/logger.rb:38:in `call_app'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/railties/lib/rails/rack/logger.rb:20:in `block in call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/tagged_logging.rb:68:in `block in tagged'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/tagged_logging.rb:26:in `tagged'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/tagged_logging.rb:68:in `tagged'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/railties/lib/rails/rack/logger.rb:20:in `call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/activesupport/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/actionpack/lib/action_dispatch/middleware/static.rb:64:in `call'
rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/railties/lib/rails/engine.rb:515:in `call'
/Users/aljazfajmut/.bundler/ruby/2.0.0/rails-c40bfc6eb2ba/railties/lib/rails/application.rb:142:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
知道为什么会这样吗?
在此之前它完美无缺......
由于
答案 0 :(得分:1)
问题在于Gem dependencies
。将这些行添加到Gemfile
:
gem 'activeadmin', :git => 'git://github.com/gregbell/active_admin.git'
gem 'formtastic' , :git => 'git://github.com/justinfrench/formtastic.git'
此外,根据聊天会话,rake
版本存在问题:
gem install rake