Skip to content

Instantly share code, notes, and snippets.

@cdesch
Created June 18, 2014 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdesch/5913c45ee59f4c4ded83 to your computer and use it in GitHub Desktop.
Save cdesch/5913c45ee59f4c4ded83 to your computer and use it in GitHub Desktop.
Started GET "/admin/events/3/edit" for 127.0.0.1 at 2014-06-18 09:35:45 -0400
Processing by Admin::EventsController#edit as HTML
Parameters: {"id"=>"3"}
AdminUser Load (0.2ms) SELECT "admin_users".* FROM "admin_users" WHERE "admin_users"."id" = 1 ORDER BY "admin_users"."id" ASC LIMIT 1
Event Load (0.1ms) SELECT "events".* FROM "events" WHERE "events"."id" = ? LIMIT 1 [["id", "3"]]
Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."id" = 3 ORDER BY "events"."id" ASC LIMIT 1
Type Load (0.2ms) SELECT "types".* FROM "types"
Type Load (0.2ms) SELECT "types".* FROM "types" WHERE "types"."id" = ? ORDER BY "types"."id" ASC LIMIT 1 [["id", 2]]
Category Load (0.1ms) SELECT "categories".* FROM "categories"
Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? ORDER BY "categories"."id" ASC LIMIT 1 [["id", 2]]
Rendered /Users/cj/.rvm/gems/ruby-2.0.0-p451@Sligo/bundler/gems/active_admin-9ca081f47ab4/app/views/active_admin/resource/edit.html.arb (240.1ms)
Completed 500 Internal Server Error in 248ms
NoMethodError - undefined method `match' for nil:NilClass:
ice_cube (0.12.0) lib/ice_cube/rule.rb:47:in `from_hash'
recurring_select (1.2.1) lib/recurring_select.rb:17:in `dirty_hash_to_rule'
recurring_select (1.2.1) app/helpers/recurring_select_helper.rb:70:in `ice_cube_rule_to_option'
recurring_select (1.2.1) app/helpers/recurring_select_helper.rb:37:in `recurring_options_for_select'
recurring_select (1.2.1) app/helpers/recurring_select_helper.rb:117:in `render'
recurring_select (1.2.1) app/helpers/recurring_select_helper.rb:7:in `select_recurring'
recurring_select (1.2.1) app/helpers/recurring_select_helper.rb:22:in `select_recurring'
app/admin/event.rb:40:in `block (3 levels) in <top (required)>'
() Users/cj/.rvm/gems/ruby-2.0.0-p451@Sligo/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin/form_builder.rb:143:in `block in field_set_and_list_wrapping'
actionpack (4.0.2) lib/action_view/helpers/capture_helper.rb:38:in `block in capture'
actionpack (4.0.2) lib/action_view/helpers/capture_helper.rb:200:in `with_output_buffer'
actionpack (4.0.2) lib/action_view/helpers/capture_helper.rb:38:in `capture'
formtastic (2.3.0.rc2) lib/formtastic/helpers/fieldset_wrapper.rb:32:in `field_set_and_list_wrapping'
() Users/cj/.rvm/gems/ruby-2.0.0-p451@Sligo/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin/form_builder.rb:142:in `field_set_and_list_wrapping'
formtastic (2.3.0.rc2) lib/formtastic/helpers/inputs_helper.rb:292:in `inputs'
() Users/cj/.rvm/gems/ruby-2.0.0-p451@Sligo/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin/form_builder.rb:20:in `block in inputs'
() Users/cj/.rvm/gems/ruby-2.0.0-p451@Sligo/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin/form_builder.rb:151:in `with_new_form_buffer'
() Users/cj/.rvm/gems/ruby-2.0.0-p451@Sligo/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin/form_builder.rb:20:in `inputs'
app/admin/event.rb:38:in `block (2 levels) in <top (required)>'
() Users/cj/.rvm/gems/ruby-2.0.0-p451@Sligo/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin/views/pages/form.rb:23:in `block in main_content'
actionpack (4.0.2) lib/action_view/helpers/capture_helper.rb:38:in `block in capture'
actionpack (4.0.2) lib/action_view/helpers/capture_helper.rb:200:in `with_output_buffer'
actionpack (4.0.2) lib/action_view/helpers/capture_helper.rb:38:in `capture'
actionpack (4.0.2) lib/action_view/helpers/form_helper.rb:435: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/cj/.rvm/gems/ruby-2.0.0-p451@Sligo/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin/view_helpers/form_helper.rb:9:in `active_admin_form_for'
arbre (1.0.1) lib/arbre/element.rb:175:in `method_missing'
() Users/cj/.rvm/gems/ruby-2.0.0-p451@Sligo/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin/views/pages/form.rb:22:in `main_content'
() Users/cj/.rvm/gems/ruby-2.0.0-p451@Sligo/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin/views/pages/base.rb:83:in `block (2 levels) in build_main_content_wrapper'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:31:in `block in build_tag'
arbre (1.0.1) lib/arbre/context.rb:92:in `with_current_arbre_element'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:26:in `build_tag'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:39:in `insert_tag'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:14:in `div'
() Users/cj/.rvm/gems/ruby-2.0.0-p451@Sligo/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin/views/pages/base.rb:82:in `block in build_main_content_wrapper'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:31:in `block in build_tag'
arbre (1.0.1) lib/arbre/context.rb:92:in `with_current_arbre_element'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:26:in `build_tag'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:39:in `insert_tag'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:14:in `div'
() Users/cj/.rvm/gems/ruby-2.0.0-p451@Sligo/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin/views/pages/base.rb:81:in `build_main_content_wrapper'
() Users/cj/.rvm/gems/ruby-2.0.0-p451@Sligo/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin/views/pages/base.rb:65:in `block in build_page_content'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:31:in `block in build_tag'
arbre (1.0.1) lib/arbre/context.rb:92:in `with_current_arbre_element'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:26:in `build_tag'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:39:in `insert_tag'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:14:in `div'
() Users/cj/.rvm/gems/ruby-2.0.0-p451@Sligo/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin/views/pages/base.rb:64:in `build_page_content'
() Users/cj/.rvm/gems/ruby-2.0.0-p451@Sligo/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin/views/pages/base.rb:47:in `block (2 levels) in build_page'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:31:in `block in build_tag'
arbre (1.0.1) lib/arbre/context.rb:92:in `with_current_arbre_element'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:26:in `build_tag'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:39:in `insert_tag'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:14:in `div'
() Users/cj/.rvm/gems/ruby-2.0.0-p451@Sligo/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin/views/pages/base.rb:44:in `block in build_page'
arbre (1.0.1) lib/arbre/context.rb:92:in `with_current_arbre_element'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element'
() Users/cj/.rvm/gems/ruby-2.0.0-p451@Sligo/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin/views/pages/base.rb:43:in `build_page'
() Users/cj/.rvm/gems/ruby-2.0.0-p451@Sligo/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin/views/pages/base.rb:10:in `build'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:30:in `block in build_tag'
arbre (1.0.1) lib/arbre/context.rb:92:in `with_current_arbre_element'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:26:in `build_tag'
arbre (1.0.1) lib/arbre/element/builder_methods.rb:39:in `insert_tag'
() Users/cj/.rvm/gems/ruby-2.0.0-p451@Sligo/bundler/gems/active_admin-9ca081f47ab4/app/views/active_admin/resource/edit.html.arb:1:in `block in ___sers_cj__rvm_gems_ruby_______p_____ligo_bundler_gems_active_admin__ca___f__ab__app_views_active_admin_resource_edit_html_arb___3274976871385382070_70210186448940'
arbre (1.0.1) lib/arbre/context.rb:45:in `initialize'
() Users/cj/.rvm/gems/ruby-2.0.0-p451@Sligo/bundler/gems/active_admin-9ca081f47ab4/app/views/active_admin/resource/edit.html.arb:1:in `___sers_cj__rvm_gems_ruby_______p_____ligo_bundler_gems_active_admin__ca___f__ab__app_views_active_admin_resource_edit_html_arb___3274976871385382070_70210186448940'
actionpack (4.0.2) lib/action_view/template.rb:143:in `block in render'
activesupport (4.0.2) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.0.2) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.0.2) lib/active_support/notifications.rb:159:in `instrument'
actionpack (4.0.2) lib/action_view/template.rb:141:in `render'
actionpack (4.0.2) lib/action_view/renderer/template_renderer.rb:49:in `block (2 levels) in render_template'
actionpack (4.0.2) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
activesupport (4.0.2) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.0.2) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.0.2) lib/active_support/notifications.rb:159:in `instrument'
actionpack (4.0.2) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
actionpack (4.0.2) lib/action_view/renderer/template_renderer.rb:48:in `block in render_template'
actionpack (4.0.2) lib/action_view/renderer/template_renderer.rb:56:in `render_with_layout'
actionpack (4.0.2) lib/action_view/renderer/template_renderer.rb:47:in `render_template'
actionpack (4.0.2) lib/action_view/renderer/template_renderer.rb:17:in `render'
actionpack (4.0.2) lib/action_view/renderer/renderer.rb:42:in `render_template'
actionpack (4.0.2) lib/action_view/renderer/renderer.rb:23:in `render'
actionpack (4.0.2) lib/abstract_controller/rendering.rb:127:in `_render_template'
actionpack (4.0.2) lib/action_controller/metal/streaming.rb:219:in `_render_template'
actionpack (4.0.2) lib/abstract_controller/rendering.rb:120:in `render_to_body'
actionpack (4.0.2) lib/action_controller/metal/rendering.rb:33:in `render_to_body'
actionpack (4.0.2) lib/action_controller/metal/renderers.rb:26:in `render_to_body'
actionpack (4.0.2) lib/abstract_controller/rendering.rb:97:in `render'
actionpack (4.0.2) lib/action_controller/metal/rendering.rb:16:in `render'
actionpack (4.0.2) lib/action_controller/metal/instrumentation.rb:41:in `block (2 levels) in render'
activesupport (4.0.2) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
/Users/cj/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
activesupport (4.0.2) lib/active_support/core_ext/benchmark.rb:12:in `ms'
actionpack (4.0.2) lib/action_controller/metal/instrumentation.rb:41:in `block in render'
actionpack (4.0.2) lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
activerecord (4.0.2) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
actionpack (4.0.2) lib/action_controller/metal/instrumentation.rb:40:in `render'
actionpack (4.0.2) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
actionpack (4.0.2) lib/action_controller/metal/responder.rb:233:in `default_render'
actionpack (4.0.2) lib/action_controller/metal/responder.rb:161:in `to_html'
responders (1.0.0) lib/responders/flash_responder.rb:104:in `to_html'
actionpack (4.0.2) lib/action_controller/metal/responder.rb:154:in `respond'
actionpack (4.0.2) lib/action_controller/metal/responder.rb:147:in `call'
actionpack (4.0.2) lib/action_controller/metal/mime_responds.rb:330:in `respond_with'
inherited_resources (1.4.1) lib/inherited_resources/actions.rb:25:in `edit'
actionpack (4.0.2) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (4.0.2) lib/abstract_controller/base.rb:189:in `process_action'
actionpack (4.0.2) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (4.0.2) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
activesupport (4.0.2) lib/active_support/callbacks.rb:443:in `_run__1764428959842494162__process_action__callbacks'
activesupport (4.0.2) lib/active_support/callbacks.rb:80:in `run_callbacks'
actionpack (4.0.2) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (4.0.2) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.0.2) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
activesupport (4.0.2) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.0.2) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.0.2) lib/active_support/notifications.rb:159:in `instrument'
actionpack (4.0.2) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.0.2) lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
activerecord (4.0.2) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.0.2) lib/abstract_controller/base.rb:136:in `process'
actionpack (4.0.2) lib/abstract_controller/rendering.rb:44:in `process'
actionpack (4.0.2) lib/action_controller/metal.rb:195:in `dispatch'
actionpack (4.0.2) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.0.2) lib/action_controller/metal.rb:231:in `block in action'
actionpack (4.0.2) lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
actionpack (4.0.2) lib/action_dispatch/routing/route_set.rb:48:in `call'
actionpack (4.0.2) lib/action_dispatch/journey/router.rb:71:in `block in call'
actionpack (4.0.2) lib/action_dispatch/journey/router.rb:59:in `call'
actionpack (4.0.2) lib/action_dispatch/routing/route_set.rb:680:in `call'
recurring_select (1.2.1) app/middleware/recurring_select_middleware.rb:22:in `call'
meta_request (0.2.8) lib/meta_request/middlewares/app_request_handler.rb:13:in `call'
rack-contrib (1.1.0) lib/rack/contrib/response_headers.rb:17:in `call'
meta_request (0.2.8) lib/meta_request/middlewares/headers.rb:16:in `call'
meta_request (0.2.8) lib/meta_request/middlewares/meta_request_handler.rb:13:in `call'
newrelic_rpm (3.7.3.204) lib/new_relic/rack/error_collector.rb:55:in `call'
newrelic_rpm (3.7.3.204) lib/new_relic/rack/agent_hooks.rb:32:in `call'
newrelic_rpm (3.7.3.204) lib/new_relic/rack/browser_monitoring.rb:27:in `call'
newrelic_rpm (3.7.3.204) lib/new_relic/rack/developer_mode.rb:45: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'
actionpack (4.0.2) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/flash.rb:241: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'
actionpack (4.0.2) lib/action_dispatch/middleware/cookies.rb:486:in `call'
dragonfly (0.9.15) lib/dragonfly/cookie_monster.rb:9:in `call'
activerecord (4.0.2) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.0.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
activerecord (4.0.2) lib/active_record/migration.rb:369:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.0.2) lib/active_support/callbacks.rb:373:in `_run__2834959918081123369__call__callbacks'
activesupport (4.0.2) lib/active_support/callbacks.rb:80:in `run_callbacks'
actionpack (4.0.2) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/reloader.rb:64:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
better_errors (1.1.0) lib/better_errors/middleware.rb:84:in `protected_app_call'
better_errors (1.1.0) lib/better_errors/middleware.rb:79:in `better_errors_call'
better_errors (1.1.0) lib/better_errors/middleware.rb:56:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.0.2) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.0.2) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.0.2) lib/active_support/tagged_logging.rb:67:in `block in tagged'
activesupport (4.0.2) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.2) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.2) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.0.2) 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'
activesupport (4.0.2) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
actionpack (4.0.2) lib/action_dispatch/middleware/static.rb:64:in `call'
rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
dragonfly (0.9.15) lib/dragonfly/middleware.rb:13:in `call'
rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
rack-cache (1.2) lib/rack/cache/context.rb:245:in `fetch'
rack-cache (1.2) lib/rack/cache/context.rb:185:in `lookup'
rack-cache (1.2) lib/rack/cache/context.rb:66:in `call!'
rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
railties (4.0.2) lib/rails/engine.rb:511:in `call'
railties (4.0.2) lib/rails/application.rb:97: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'
/Users/cj/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
/Users/cj/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
/Users/cj/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
cache: [GET /admin/events/3/edit] miss
Started POST "/__better_errors/70210219898940/variables" for 127.0.0.1 at 2014-06-18 09:35:46 -0400
cache: [POST /__better_errors/70210219898940/variables] invalidate, pass
#event model
class Event < ActiveRecord::Base
mount_uploader :image, EventUploader
serialize :recurring_rule, Hash
attr_accessor :parent_event
belongs_to :category
belongs_to :type
def recurring_rule=(new_rule)
if RecurringSelect.is_valid_rule?(new_rule)
schedule = IceCube::Schedule.new(Time.now)
schedule.add_recurrence_rule(RecurringSelect.dirty_hash_to_rule(new_rule))
write_attribute(:recurring_rule,schedule.to_hash)
else
write_attribute(:recurring_rule, nil)
end
end
end
#Active Admin Form
ActiveAdmin.register Event do
form do |f|
#Debugging
f.semantic_errors *f.object.errors.keys
f.inputs "Details" do
f.input :title, :required => true
f.input :short_description true
f.input :description, as: :wysihtml5
f.input :event_date
f.input :type, :required => true
f.input :category, :required => true
f.input :published, :label => "Published"
f.input :image
f.input :remote_image_url
f.input :recurring_time
end
f.inputs "Recurring" do
f.select_recurring :recurring_rule
end
f.actions
end
controller do
def permitted_params
params.permit event: [:title,:image, :remote_image_url, :description, :short_description, :published, :event_date, :recurring_rule, :type_id, :category_id, :recurring_time ]
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment