I am getting this warning Warning: Error loading - ruby-on-rails

I am upgrading from rails 2.3 to rails 3.2. I have models divided into sub folders. Just like there is a model app/models/ad/ad.rb the other app/models/ad/ad_city.rb but inside the model it is written as:
class Ad < ActiveRecord::Base
class AdCity < ActiveRecord::Base
and not:
class Ad::Ad < ActiveRecord::Base
class Ad::AdCity < ActiveRecord::Base
I have in my application.rb:
config.autoload_paths += Dir[Rails.root.join('app', 'models', '{**}')]
even I tried including each folder in config.autoload_paths. But it give me a thousand lines warning:
Warning: Error loading /home/deep/projects/upgrade/models/myapp/app/models/ad/ad_city.rb:
uninitialized constant Ad::AdCity
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/inflector/methods.rb:230:in `block in constantize'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/inflector/methods.rb:229:in `each'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/inflector/methods.rb:229:in `constantize'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/core_ext/string/inflections.rb:54:in `constantize'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx/context.rb:64:in `block (2 levels) in load_models'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx/context.rb:54:in `each'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx/context.rb:54:in `block in load_models'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx/context.rb:53:in `each'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx/context.rb:53:in `load_models'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx/context.rb:15:in `prepare'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx.rb:81:in `block in context'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx.rb:78:in `synchronize'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx.rb:78:in `context'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx/active_record.rb:162:in `define_index'
/home/deep/projects/upgrade/models/myapp/app/models/user/user_indexes.rb:6:in `included'
/home/deep/projects/upgrade/models/myapp/app/models/user/user.rb:295:in `include'
/home/deep/projects/upgrade/models/myapp/app/models/user/user.rb:295:in `<class:User>'
/home/deep/projects/upgrade/models/myapp/app/models/user/user.rb:1:in `<top (required)>'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/bundler/gems/rails-dev-boost-bf49caca6670/lib/rails_development_boost/dependencies_patch.rb:364:in `block in load_file_with_constant_tracking_internal'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/bundler/gems/rails-dev-boost-bf49caca6670/lib/rails_development_boost/dependencies_patch.rb:240:in `now_loading'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/bundler/gems/rails-dev-boost-bf49caca6670/lib/rails_development_boost/dependencies_patch.rb:364:in `load_file_with_constant_tracking_internal'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/bundler/gems/rails-dev-boost-bf49caca6670/lib/rails_development_boost/dependencies_patch.rb:234:in `block in load_file_with_constant_tracking'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/bundler/gems/rails-dev-boost-bf49caca6670/lib/rails_development_boost/dependencies_patch.rb:383:in `async_synchronize'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/bundler/gems/rails-dev-boost-bf49caca6670/lib/rails_development_boost/dependencies_patch.rb:229:in `load_file_with_constant_tracking'
/home/deep/projects/upgrade/models/myapp/lib/authenticated_system.rb:108:in `login_from_session'
/home/deep/projects/upgrade/models/myapp/lib/authenticated_system.rb:24:in `current_user'
/home/deep/projects/upgrade/models/myapp/lib/authenticated_system.rb:14:in `logged_in?'
/home/deep/projects/upgrade/models/myapp/app/controllers/application_controller.rb:288:in `set_timezone'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:429:in `_run__402496120916004207__process_action__1098406492416702350__callbacks'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_controller/metal/rescue.rb:29:in `process_action'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/notifications.rb:123:in `block in instrument'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/notifications.rb:123:in `instrument'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activerecord-3.2.19/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/abstract_controller/base.rb:121:in `process'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/abstract_controller/rendering.rb:45:in `process'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_controller/metal.rb:203:in `dispatch'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_controller/metal.rb:246:in `block in action'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/routing/route_set.rb:73:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/routing/route_set.rb:36:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/routing/route_set.rb:608:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/exception_notification-4.0.1/lib/exception_notification/rack.rb:28:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/bundler/gems/rails-dev-boost-bf49caca6670/lib/rails_development_boost/async.rb:14:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/rack-1.4.5/lib/rack/etag.rb:23:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/rack-1.4.5/lib/rack/conditionalget.rb:25:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/head.rb:14:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/flash.rb:242:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/cookies.rb:341:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activerecord-3.2.19/lib/active_record/query_cache.rb:64:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:405:in `_run__2960753221531180313__call__4371824738127159201__callbacks'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/reloader.rb:65:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/better_errors-2.0.0/lib/better_errors/middleware.rb:84:in `protected_app_call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/better_errors-2.0.0/lib/better_errors/middleware.rb:79:in `better_errors_call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/better_errors-2.0.0/lib/better_errors/middleware.rb:57:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/railties-3.2.19/lib/rails/rack/logger.rb:32:in `call_app'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/railties-3.2.19/lib/rails/rack/logger.rb:16:in `block in call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/tagged_logging.rb:22:in `tagged'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/railties-3.2.19/lib/rails/rack/logger.rb:16:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/request_id.rb:22:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/static.rb:63:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/railties-3.2.19/lib/rails/engine.rb:484:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/railties-3.2.19/lib/rails/application.rb:231:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/rack-1.4.5/lib/rack/content_length.rb:14:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/railties-3.2.19/lib/rails/rack/log_tailer.rb:17:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/rack-1.4.5/lib/rack/handler/webrick.rb:59:in `service'
/home/deep/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'
/home/deep/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
/home/deep/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'
for all the models. It doesn't throw any error just gives warning each time my app makes any connection with the database. What should I do. Please help

Related

ActiveStorage S3 file upload undefined keyword content_type

I'm encountering an issue with ActiveStorage while uploading a file to S3.
I get an ArgumentError (unknown keyword: content_type) in active_storage/service/s3_service.rb and can't find the source of the issue.
Stacktrace:
ArgumentError: unknown keyword: content_type
from active_storage/service/s3_service.rb:19:in `upload'
from active_storage/blob.rb:155:in `upload'
from active_storage/blob.rb:53:in `block in build_after_upload'
from active_storage/blob.rb:48:in `tap'
from active_storage/blob.rb:48:in `build_after_upload'
from active_storage/blob.rb:61:in `create_after_upload!'
from active_storage/attached.rb:23:in `create_blob_from'
from active_storage/attached/one.rb:24:in `attach'
from app/controllers/admin/venues_controller.rb:48:in `update'
from action_controller/metal/basic_implicit_render.rb:6:in `send_action'
from abstract_controller/base.rb:194:in `process_action'
from action_controller/metal/rendering.rb:30:in `process_action'
from abstract_controller/callbacks.rb:42:in `block in process_action'
from active_support/callbacks.rb:109:in `block in run_callbacks'
from raven/integrations/rails/controller_transaction.rb:7:in `block in included'
from active_support/callbacks.rb:118:in `instance_exec'
from active_support/callbacks.rb:118:in `block in run_callbacks'
from active_support/callbacks.rb:136:in `run_callbacks'
from abstract_controller/callbacks.rb:41:in `process_action'
from action_controller/metal/rescue.rb:22:in `process_action'
from action_controller/metal/instrumentation.rb:34:in `block in process_action'
from active_support/notifications.rb:168:in `block in instrument'
from active_support/notifications/instrumenter.rb:23:in `instrument'
from active_support/notifications.rb:168:in `instrument'
from action_controller/metal/instrumentation.rb:32:in `process_action'
from action_controller/metal/params_wrapper.rb:256:in `process_action'
from active_record/railties/controller_runtime.rb:24:in `process_action'
from abstract_controller/base.rb:134:in `process'
from action_view/rendering.rb:32:in `process'
from action_controller/metal.rb:191:in `dispatch'
from action_controller/metal.rb:252:in `dispatch'
from action_dispatch/routing/route_set.rb:52:in `dispatch'
from action_dispatch/routing/route_set.rb:34:in `serve'
from action_dispatch/journey/router.rb:52:in `block in serve'
from action_dispatch/journey/router.rb:35:in `each'
from action_dispatch/journey/router.rb:35:in `serve'
from action_dispatch/routing/route_set.rb:840:in `call'
from skylight/core/probes/action_dispatch/routing/route_set.rb:14:in `block in call'
from skylight/core/fanout.rb:25:in `instrument'
from skylight/core/probes/action_dispatch/routing/route_set.rb:13:in `call'
from warden/jwt_auth/middleware/token_dispatcher.rb:20:in `call'
from warden/jwt_auth/middleware/revocation_manager.rb:21:in `call'
from rack/builder.rb:153:in `call'
from warden/jwt_auth/middleware.rb:23:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from i18n/js/middleware.rb:14:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from warden/manager.rb:36:in `block in call'
from warden/manager.rb:34:in `catch'
from warden/manager.rb:34:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from rack/tempfile_reaper.rb:15:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from rack/etag.rb:25:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from rack/conditional_get.rb:38:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from rack/head.rb:12:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from action_dispatch/http/content_security_policy.rb:18:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from rack/session/abstract/id.rb:232:in `context'
from rack/session/abstract/id.rb:226:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from action_dispatch/middleware/cookies.rb:670:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from action_dispatch/middleware/callbacks.rb:28:in `block in call'
from active_support/callbacks.rb:98:in `run_callbacks'
from action_dispatch/middleware/callbacks.rb:26:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from action_dispatch/middleware/debug_exceptions.rb:61:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from action_dispatch/middleware/show_exceptions.rb:33:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from rails/rack/logger.rb:38:in `call_app'
from rails/rack/logger.rb:26:in `block in call'
from active_support/tagged_logging.rb:71:in `block in tagged'
from active_support/tagged_logging.rb:28:in `tagged'
from active_support/tagged_logging.rb:71:in `tagged'
from rails/rack/logger.rb:26:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from action_dispatch/middleware/remote_ip.rb:81:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from request_store/middleware.rb:19:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from action_dispatch/middleware/request_id.rb:27:in `call'
from skylight/core/probes/action_dispatch/request_id.rb:12:in `call'
from rack/method_override.rb:22:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from rack/runtime.rb:22:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from action_dispatch/middleware/executor.rb:14:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from rack/sendfile.rb:111:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from action_dispatch/middleware/ssl.rb:74:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from raven/integrations/rack.rb:51:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from rack/cors.rb:97:in `call'
from skylight/core/probes/middleware.rb:26:in `call'
from rails/engine.rb:524:in `call'
from puma/configuration.rb:225:in `call'
from puma/server.rb:658:in `handle_request'
from puma/server.rb:472:in `process_client'
from puma/server.rb:332:in `block in run'
from puma/thread_pool.rb:133:in `block in spawn_thread'
The model has one attached logo (an image) and I try to update the model with an image.
has_one_attached :logo
#venue.logo.attach(venue_params[:logo]) if venue_params[:logo].present?
I browsed the ActiveStorage source on GitHub but I can't find the issue with the argument.
In advance, thank you very much!

Error while uploading mp3 file to aws bucket using carrierwave

I'm trying to upload a mp3 file to aws bucket using carrierwave gem. I'm getting Broken Pipe exception. Here is the full trace
Broken pipe (Errno::EPIPE)
/Users/datt/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/openssl/buffering.rb:376:in `syswrite_nonblock'
/Users/datt/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/openssl/buffering.rb:376:in `write_nonblock'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/socket.rb:243:in `block in write_nonblock'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/socket.rb:238:in `loop'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/socket.rb:238:in `write_nonblock'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/socket.rb:78:in `write'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/connection.rb:152:in `request_call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/middlewares/mock.rb:47:in `request_call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/middlewares/instrumentor.rb:22:in `request_call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/middlewares/base.rb:15:in `request_call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/middlewares/base.rb:15:in `request_call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/middlewares/base.rb:15:in `request_call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/connection.rb:233:in `request'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/middlewares/idempotent.rb:26:in `error_call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/middlewares/base.rb:10:in `error_call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/middlewares/base.rb:10:in `error_call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/connection.rb:256:in `rescue in request'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/connection.rb:204:in `request'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/middlewares/idempotent.rb:26:in `error_call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/middlewares/base.rb:10:in `error_call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/middlewares/base.rb:10:in `error_call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/connection.rb:256:in `rescue in request'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/connection.rb:204:in `request'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/middlewares/idempotent.rb:26:in `error_call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/middlewares/base.rb:10:in `error_call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/middlewares/base.rb:10:in `error_call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/connection.rb:256:in `rescue in request'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/excon-0.45.3/lib/excon/connection.rb:204:in `request'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/fog-core-1.30.0/lib/fog/core/connection.rb:81:in `request'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/fog-xml-0.1.2/lib/fog/xml/connection.rb:9:in `request'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/fog-aws-0.1.2/lib/fog/aws/storage.rb:593:in `_request'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/fog-aws-0.1.2/lib/fog/aws/storage.rb:588:in `request'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/fog-aws-0.1.2/lib/fog/aws/requests/storage/put_object.rb:43:in `put_object'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/fog-aws-0.1.2/lib/fog/aws/models/storage/file.rb:212:in `save'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/fog-core-1.30.0/lib/fog/core/collection.rb:51:in `create'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/carrierwave-0.10.0/lib/carrierwave/storage/fog.rb:261:in `store'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/carrierwave-0.10.0/lib/carrierwave/storage/fog.rb:80:in `store!'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/carrierwave-0.10.0/lib/carrierwave/uploader/store.rb:59:in `block in store!'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/carrierwave-0.10.0/lib/carrierwave/uploader/callbacks.rb:17:in `with_callbacks'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/carrierwave-0.10.0/lib/carrierwave/uploader/store.rb:58:in `store!'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/carrierwave-0.10.0/lib/carrierwave/mount.rb:375:in `store!'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/carrierwave-0.10.0/lib/carrierwave/mount.rb:207:in `store_file_url!'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:427:in `block in make_lambda'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:225:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:225:in `block in halting_and_conditional'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:219:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:219:in `block in halting_and_conditional'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `_run_callbacks'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in `_run_save_callbacks'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activerecord-4.2.0/lib/active_record/callbacks.rb:302:in `create_or_update'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activerecord-4.2.0/lib/active_record/persistence.rb:120:in `save'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activerecord-4.2.0/lib/active_record/validations.rb:37:in `save'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activerecord-4.2.0/lib/active_record/attribute_methods/dirty.rb:21:in `save'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activerecord-4.2.0/lib/active_record/transactions.rb:286:in `block (2 levels) in save'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activerecord-4.2.0/lib/active_record/transactions.rb:347:in `block in with_transaction_returning_status'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/transaction.rb:188:in `within_new_transaction'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activerecord-4.2.0/lib/active_record/transactions.rb:220:in `transaction'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activerecord-4.2.0/lib/active_record/transactions.rb:344:in `with_transaction_returning_status'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activerecord-4.2.0/lib/active_record/transactions.rb:286:in `block in save'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activerecord-4.2.0/lib/active_record/transactions.rb:301:in `rollback_active_record_state!'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activerecord-4.2.0/lib/active_record/transactions.rb:285:in `save'
/Users/datt/projects/ruby/yogurt/Yolo/app/controllers/sound_tracks_controller.rb:59:in `upload'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/abstract_controller/base.rb:198:in `process_action'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_controller/metal/rendering.rb:10:in `process_action'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:117:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:117:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `block in halting'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `_run_callbacks'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in `_run_process_action_callbacks'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/abstract_controller/callbacks.rb:19:in `process_action'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_controller/metal/rescue.rb:29:in `process_action'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `block in instrument'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `instrument'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activerecord-4.2.0/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/abstract_controller/base.rb:137:in `process'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionview-4.2.0/lib/action_view/rendering.rb:30:in `process'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_controller/metal.rb:195:in `dispatch'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_controller/metal.rb:236:in `block in action'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:73:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:42:in `serve'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_dispatch/journey/router.rb:43:in `block in serve'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_dispatch/journey/router.rb:30:in `each'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_dispatch/journey/router.rb:30:in `serve'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:802:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.6.0/lib/rack/etag.rb:24:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.6.0/lib/rack/conditionalget.rb:38:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.6.0/lib/rack/head.rb:13:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_dispatch/middleware/flash.rb:260:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.6.0/lib/rack/session/abstract/id.rb:225:in `context'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.6.0/lib/rack/session/abstract/id.rb:220:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_dispatch/middleware/cookies.rb:560:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activerecord-4.2.0/lib/active_record/query_cache.rb:36:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:647:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activerecord-4.2.0/lib/active_record/migration.rb:378:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:88:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:88:in `_run_callbacks'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in `_run_call_callbacks'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_dispatch/middleware/reloader.rb:73:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.2.0/lib/rails/rack/logger.rb:38:in `call_app'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.2.0/lib/rails/rack/logger.rb:20:in `block in call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/tagged_logging.rb:68:in `block in tagged'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/tagged_logging.rb:26:in `tagged'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/tagged_logging.rb:68:in `tagged'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.2.0/lib/rails/rack/logger.rb:20:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_dispatch/middleware/request_id.rb:21:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.6.0/lib/rack/methodoverride.rb:22:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.6.0/lib/rack/runtime.rb:18:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.2.0/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.6.0/lib/rack/lock.rb:17:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/actionpack-4.2.0/lib/action_dispatch/middleware/static.rb:113:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.6.0/lib/rack/sendfile.rb:113:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.2.0/lib/rails/engine.rb:518:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.2.0/lib/rails/application.rb:164:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.6.0/lib/rack/lock.rb:17:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.6.0/lib/rack/content_length.rb:15:in `call'
/Users/datt/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.6.0/lib/rack/handler/webrick.rb:89:in `service'
/Users/datt/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
/Users/datt/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
/Users/datt/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
Completed 422 Unprocessable Entity in 26996ms (Views: 0.5ms | ActiveRecord: 39.7ms)
I found the problem. Carrierwave configurations for aws s3 was improper.

raise_in_transactional_callbacks issue with paperclip (rails 4.2)

I've updated to rails 4.2. When I follow up on deprecation warnings and set config.active_record.raise_in_transactional_callbacks = true in my environment, I start running into issues:
Failure/Error: Unable to find matching line from backtrace
NoMethodError:
undefined method `id' for nil:NilClass
The id refers to current_user.id, which has become unavailable (hence the warden and devise mentions in the error trace).
When removing config.active_record.raise_in_transactional_callbacks = true, deprecation warnings appear only with respect to two models that use paperclip, which leads me to believe that this might be an issue with paperclip callbacks. I could just ignore the deprecation warnings, but i'd rather fix the underlying issue. Any suggestions?
Here's an error trace:
commpleted 500 Internal Server Error in 152ms
Unexpected error while processing request: undefined method `env' for nil:NilClass
/Users/j/.rvm/gems/ruby-2.1.2/gems/devise-3.4.1/lib/devise/controllers/helpers.rb:135:in `warden'
/Users/j/.rvm/gems/ruby-2.1.2/gems/devise-3.4.1/lib/devise/controllers/helpers.rb:120:in `current_user'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/abstract_controller/helpers.rb:67:in `current_user'
/Users/j/Google Drive/rails_projects/versneller/app/views/sync/messages/_message.html.erb:48:in `_app_views_sync_messages__message_html_erb___1152654597097292680_70140856995020'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/template.rb:145:in `block in render'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/notifications.rb:166:in `instrument'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/template.rb:333:in `instrument'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/template.rb:143:in `render'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/renderer/partial_renderer.rb:339:in `render_partial'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/renderer/partial_renderer.rb:310:in `block in render'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `block in instrument'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `instrument'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/renderer/partial_renderer.rb:309:in `render'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/renderer/renderer.rb:47:in `render_partial'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/renderer/renderer.rb:21:in `render'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/helpers/rendering_helper.rb:32:in `render'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/renderer.rb:16:in `render_to_string'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/partial.rb:29:in `render_to_string'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/partial_creator.rb:30:in `message'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/actions.rb:87:in `block (2 levels) in sync_new'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/actions.rb:86:in `collect'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/actions.rb:86:in `block in sync_new'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/actions.rb:80:in `collect'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/actions.rb:80:in `sync_new'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/action.rb:17:in `perform'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/model_actions.rb:48:in `each'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/model_actions.rb:48:in `publish_sync_actions'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:427:in `block in make_lambda'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:250:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:250:in `block in conditional'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:245:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:245:in `block in conditional'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `_run_callbacks'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in `_run_commit_callbacks'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/transactions.rb:314:in `committed!'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/transaction.rb:93:in `commit_records'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/transaction.rb:157:in `commit'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/transactions.rb:220:in `transaction'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/transactions.rb:344:in `with_transaction_returning_status'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/transactions.rb:286:in `block in save'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/transactions.rb:301:in `rollback_active_record_state!'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/transactions.rb:285:in `save'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/persistence.rb:34:in `create'
/Users/j/Google Drive/rails_projects/versneller/app/controllers/instances_controller.rb:74:in `advice'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/abstract_controller/base.rb:198:in `process_action'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_controller/metal/rendering.rb:10:in `process_action'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:117:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:117:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:288:in `block (2 levels) in halting_and_conditional'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/controller_helpers.rb:22:in `block in enable_sync'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/model.rb:24:in `enable'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/controller_helpers.rb:21:in `enable_sync'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:427:in `block in make_lambda'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:287:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:287:in `block in halting_and_conditional'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:151:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:151:in `block in halting_and_conditional'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `block in halting'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `block in halting'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `_run_callbacks'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in `_run_process_action_callbacks'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/abstract_controller/callbacks.rb:19:in `process_action'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_controller/metal/rescue.rb:29:in `process_action'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `block in instrument'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `instrument'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/abstract_controller/base.rb:137:in `process'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/rendering.rb:30:in `process'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_controller/metal.rb:195:in `dispatch'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_controller/metal.rb:236:in `block in action'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:73:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:42:in `serve'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/journey/router.rb:43:in `block in serve'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/journey/router.rb:30:in `each'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/journey/router.rb:30:in `serve'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:802:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/bullet-4.14.4/lib/bullet/rack.rb:10:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/warden-1.2.3/lib/warden/manager.rb:34:in `catch'
/Users/j/.rvm/gems/ruby-2.1.2/gems/warden-1.2.3/lib/warden/manager.rb:34:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/etag.rb:24:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/conditionalget.rb:25:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/head.rb:13:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/remotipart-1.2.1/lib/remotipart/middleware.rb:27:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/middleware/flash.rb:260:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/session/abstract/id.rb:225:in `context'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/session/abstract/id.rb:220:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/middleware/cookies.rb:560:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/query_cache.rb:36:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:647:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:88:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:88:in `_run_callbacks'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in `_run_call_callbacks'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/middleware/reloader.rb:73:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/railties-4.2.0/lib/rails/rack/logger.rb:38:in `call_app'
/Users/j/.rvm/gems/ruby-2.1.2/gems/railties-4.2.0/lib/rails/rack/logger.rb:20:in `block in call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/tagged_logging.rb:68:in `block in tagged'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/tagged_logging.rb:26:in `tagged'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/tagged_logging.rb:68:in `tagged'
/Users/j/.rvm/gems/ruby-2.1.2/gems/railties-4.2.0/lib/rails/rack/logger.rb:20:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/middleware/request_id.rb:21:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/methodoverride.rb:22:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/runtime.rb:18:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/lock.rb:17:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/middleware/static.rb:113:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/sendfile.rb:113:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/railties-4.2.0/lib/rails/engine.rb:518:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/railties-4.2.0/lib/rails/application.rb:164:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/content_length.rb:15:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/thin-1.6.3/lib/thin/connection.rb:86:in `block in pre_process'
/Users/j/.rvm/gems/ruby-2.1.2/gems/thin-1.6.3/lib/thin/connection.rb:84:in `catch'
/Users/j/.rvm/gems/ruby-2.1.2/gems/thin-1.6.3/lib/thin/connection.rb:84:in `pre_process'
/Users/j/.rvm/gems/ruby-2.1.2/gems/thin-1.6.3/lib/thin/connection.rb:53:in `process'
/Users/j/.rvm/gems/ruby-2.1.2/gems/thin-1.6.3/lib/thin/connection.rb:39:in `receive_data'
/Users/j/.rvm/gems/ruby-2.1.2/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run_machine'
/Users/j/.rvm/gems/ruby-2.1.2/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run'
/Users/j/.rvm/gems/ruby-2.1.2/gems/thin-1.6.3/lib/thin/backends/base.rb:73:in `start'
/Users/j/.rvm/gems/ruby-2.1.2/gems/thin-1.6.3/lib/thin/server.rb:162:in `start'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/handler/thin.rb:19:in `run'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/server.rb:286:in `start'
/Users/j/.rvm/gems/ruby-2.1.2/gems/railties-4.2.0/lib/rails/commands/server.rb:80:in `start'
/Users/j/.rvm/gems/ruby-2.1.2/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in `block in server'
/Users/j/.rvm/gems/ruby-2.1.2/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
/Users/j/.rvm/gems/ruby-2.1.2/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
/Users/j/.rvm/gems/ruby-2.1.2/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
/Users/j/.rvm/gems/ruby-2.1.2/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
bin/railre'
Here is the issue related to what you say : https://github.com/thoughtbot/paperclip/issues/1933 (especially my comments : https://github.com/thoughtbot/paperclip/issues/1933#issuecomment-169607838 and https://github.com/thoughtbot/paperclip/issues/1933#issuecomment-170509222 )
Please note that this warning is not an error, it only tells you the futur behaviour of ActiveRecord, which is not to shallow error.
Removing config.active_record.raise_in_transactional_callbacks = true will show you the warning of after_commit / after_rollback and switch to the old behaviour, which is shallowing errors.

.includes method doesn't work

I have installed the gem bullet to enhance performences on my small app (which is running with Rails 4 Edge)
However, the '.includes' method doesn't seem to work:
def index
#articles = Article.includes(:category)
end
This returns 'can't convert Symbol into Integer'
Same goes when I'm running this in the rails console, for any association I got this same error; is .includes is deprecated, or am I doing it wrong?
Thanks
Here is the fulltrace:
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/associations/preloader/association.rb:106:in `[]'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/associations/preloader/association.rb:106:in `build_scope'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/associations/preloader/association.rb:28:in `scope'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/associations/preloader/association.rb:32:in `records_for'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/associations/preloader/association.rb:80:in `block in associated_records_by_owner'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/associations/preloader/association.rb:80:in `each'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/associations/preloader/association.rb:80:in `each_slice'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/associations/preloader/association.rb:80:in `each'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/associations/preloader/association.rb:80:in `map'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/associations/preloader/association.rb:80:in `associated_records_by_owner'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/associations/preloader/singular_association.rb:9:in `preload'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/associations/preloader/association.rb:19:in `run'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/associations/preloader.rb:129:in `block (2 levels) in preload_one'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/associations/preloader.rb:128:in `each'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/associations/preloader.rb:128:in `block in preload_one'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/associations/preloader.rb:127:in `each'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/associations/preloader.rb:127:in `preload_one'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/associations/preloader.rb:104:in `preload'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/associations/preloader.rb:93:in `block in run'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/associations/preloader.rb:93:in `each'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/associations/preloader.rb:93:in `run'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/relation.rb:570:in `block in exec_queries'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/relation.rb:569:in `each'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/relation.rb:569:in `exec_queries'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/relation.rb:456:in `block in load'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/explain.rb:29:in `logging_query_plan'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/relation.rb:456:in `load'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/relation.rb:197:in `to_a'
bullet (4.3.0) lib/bullet/active_record3x.rb:10:in `to_a'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/relation/delegation.rb:13:in `each'
app/views/articles/index.html.slim:44:in `_app_views_articles_index_html_slim___1140651801917805301_70356832595700'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_view/template.rb:144:in `block in render'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activesupport/lib/active_support/notifications.rb:160:in `instrument'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_view/template.rb:142:in `render'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_view/renderer/template_renderer.rb:49:in `block (2 levels) in render_template'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_view/renderer/abstract_renderer.rb:23:in `block in instrument'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activesupport/lib/active_support/notifications.rb:158:in `block in instrument'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activesupport/lib/active_support/notifications.rb:158:in `instrument'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_view/renderer/abstract_renderer.rb:23:in `instrument'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_view/renderer/template_renderer.rb:48:in `block in render_template'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_view/renderer/template_renderer.rb:56:in `render_with_layout'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_view/renderer/template_renderer.rb:47:in `render_template'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_view/renderer/template_renderer.rb:17:in `render'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_view/renderer/renderer.rb:36:in `render_template'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_view/renderer/renderer.rb:17:in `render'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/abstract_controller/rendering.rb:119:in `_render_template'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_controller/metal/streaming.rb:219:in `_render_template'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/abstract_controller/rendering.rb:112:in `render_to_body'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_controller/metal/rendering.rb:33:in `render_to_body'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_controller/metal/renderers.rb:26:in `render_to_body'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/abstract_controller/rendering.rb:97:in `render'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_controller/metal/rendering.rb:16:in `render'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_controller/metal/instrumentation.rb:41:in `block (2 levels) in render'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_controller/metal/instrumentation.rb:41:in `block in render'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `render'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_controller/metal/implicit_render.rb:5:in `send_action'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/abstract_controller/base.rb:189:in `process_action'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_controller/metal/rendering.rb:10:in `process_action'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activesupport/lib/active_support/callbacks.rb:413:in `_run__4416358697319013222__process_action__callbacks'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activesupport/lib/active_support/callbacks.rb:78:in `run_callbacks'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_controller/metal/rescue.rb:29:in `process_action'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activesupport/lib/active_support/notifications.rb:158:in `block in instrument'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activesupport/lib/active_support/notifications.rb:158:in `instrument'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/abstract_controller/base.rb:136:in `process'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/abstract_controller/rendering.rb:44:in `process'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_controller/metal.rb:195:in `dispatch'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_controller/metal.rb:231:in `block in action'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_dispatch/routing/route_set.rb:77:in `call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_dispatch/routing/route_set.rb:77:in `dispatch'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_dispatch/routing/route_set.rb:45:in `call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_dispatch/journey/router.rb:69:in `block in call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_dispatch/journey/router.rb:57:in `each'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_dispatch/journey/router.rb:57:in `call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_dispatch/routing/route_set.rb:614:in `call'
bullet (4.3.0) lib/bullet/rack.rb:11:in `call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
rack (1.4.2) lib/rack/etag.rb:23:in `call'
rack (1.4.2) lib/rack/conditionalget.rb:25:in `call'
rack (1.4.2) lib/rack/head.rb:9:in `call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_dispatch/middleware/params_parser.rb:30:in `call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_dispatch/middleware/flash.rb:233:in `call'
rack (1.4.2) lib/rack/session/abstract/id.rb:210:in `context'
rack (1.4.2) lib/rack/session/abstract/id.rb:205:in `call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_dispatch/middleware/cookies.rb:443:in `call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/query_cache.rb:36:in `call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:631:in `call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activerecord/lib/active_record/migration.rb:348:in `call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activesupport/lib/active_support/callbacks.rb:373:in `_run__1420375788820113751__call__callbacks'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activesupport/lib/active_support/callbacks.rb:78:in `run_callbacks'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_dispatch/middleware/reloader.rb:64:in `call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/railties/lib/rails/rack/logger.rb:32:in `call_app'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/railties/lib/rails/rack/logger.rb:16:in `block in call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activesupport/lib/active_support/tagged_logging.rb:67:in `block in tagged'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activesupport/lib/active_support/tagged_logging.rb:25:in `tagged'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activesupport/lib/active_support/tagged_logging.rb:67:in `tagged'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/railties/lib/rails/rack/logger.rb:16:in `call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.4.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.2) lib/rack/runtime.rb:17:in `call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/activesupport/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.2) lib/rack/lock.rb:15:in `call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/actionpack/lib/action_dispatch/middleware/static.rb:63:in `call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/railties/lib/rails/engine.rb:508:in `call'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/rails-e63e280bed3a/railties/lib/rails/application.rb:95:in `call'
rack (1.4.2) lib/rack/lock.rb:15:in `call'
rack (1.4.2) lib/rack/content_length.rb:14:in `call'
rack (1.4.2) lib/rack/handler/webrick.rb:59:in `service'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
/home/shideneyu/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
Last but not least, where the error is:
th Actions
tbody
- #articles.each do |article| <---- This line is highlited for the error
tr
td
div class="span1"
Article Model:
class Article < ActiveRecord::Base
attr_readonly :user_id
belongs_to :category
belongs_to :user
with_options(dependent: :destroy) do |opts|
opts.has_many :events, as: :eventable
opts.has_many :mentions, as: :mentionable
opts.has_many :comments, as: :commentable
end
has_and_belongs_to_many :tags, :uniq => true
validates_presence_of :category, :content
validates_uniqueness_of :name, scope: :category_id
end
.includes method works for instances that means your method should look like this :
def index
#articles = Article.includes(:category).find(1)
end
or for example of collection
def index
#articles = #blog.articles.includes(:category)
end

Crafting Rails Chapter 7: MultiJson::DecodeError - 756: unexpected token at '"Validation failed: %{errors}"':

I'm following through the 'Crafting Rails' book, and I've come to hurdle I just can't get over in the final Chapter (Chap 7)
When I try to run the project at the end of 7.3, I get:
MultiJson::DecodeError - 756: unexpected token at '"Validation failed: %{errors}"':
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/json-1.6.5/lib/json/common.rb:148:in `parse'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/json-1.6.5/lib/json/common.rb:148:in `parse'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/multi_json-1.1.0/lib/multi_json/engines/json_common.rb:9:in `decode'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/multi_json-1.1.0/lib/multi_json.rb:79:in `decode'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.2/lib/active_support/json/decoding.rb:12:in `decode'
/Users/john/Manuals/Rails/Crafting Rails/Chap7/translator-old/lib/translator/app.rb:32:in `locale_value'
/Users/john/Manuals/Rails/Crafting Rails/Chap7/translator-old/lib/translator/app.rb:55:in `block in evaluate_source'
/Users/john/Manuals/Rails/Crafting Rails/Chap7/translator-old/lib/translator/app.rb:54:in `each'
/Users/john/Manuals/Rails/Crafting Rails/Chap7/translator-old/lib/translator/app.rb:54:in `evaluate_source'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/tilt-1.3.3/lib/tilt/template.rb:209:in `instance_eval'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/tilt-1.3.3/lib/tilt/template.rb:209:in `evaluate_source'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/tilt-1.3.3/lib/tilt/template.rb:144:in `cached_evaluate'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/tilt-1.3.3/lib/tilt/template.rb:127:in `evaluate'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/tilt-1.3.3/lib/tilt/haml.rb:24:in `evaluate'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:636:in `render'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:532:in `haml'
/Users/john/Manuals/Rails/Crafting Rails/Chap7/translator-old/lib/translator/app.rb:19:in `exhibit_translations'
/Users/john/Manuals/Rails/Crafting Rails/Chap7/translator-old/lib/translator/app.rb:10:in `block in <class:App>'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:1211:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:1211:in `block in compile!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `[]'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `block (3 levels) in route!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:801:in `route_eval'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `block (2 levels) in route!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:822:in `block in process_route'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:in `catch'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:in `process_route'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:784:in `block in route!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:in `each'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:in `route!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:886:in `dispatch!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:in `block in call!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `block in invoke'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `catch'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `invoke'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:in `call!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:705:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/nulllogger.rb:9:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/head.rb:9:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:1334:in `block in call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:1416:in `synchronize'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:1334:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/journey-1.0.3/lib/journey/router.rb:68:in `block in call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/journey-1.0.3/lib/journey/router.rb:56:in `each'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/journey-1.0.3/lib/journey/router.rb:56:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/routing/route_set.rb:594:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sass-3.1.15/lib/sass/plugin/rack.rb:54:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/conditionalget.rb:25:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/head.rb:14:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/flash.rb:242:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in `context'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/cookies.rb:338:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.2/lib/active_record/query_cache.rb:64:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:443:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:405:in `_run__2584460681594678013__call__1225515721622234840__callbacks'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:405:in `__run_callback'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/reloader.rb:65:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/rack/logger.rb:26:in `call_app'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/rack/logger.rb:16:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/request_id.rb:22:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.2/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/static.rb:61:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/engine.rb:479:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/application.rb:220:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/content_length.rb:14:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/rack/log_tailer.rb:14:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/handler/webrick.rb:59:in `service'
/Users/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
/Users/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
/Users/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
I've tried stripping all symbols out of that string, but no joy - same issue. Any idea what might be going wrong here? I've literally copied & pasted from the book, so I don't think it's a typo. Could possibly be a redis issue (I'm unfamiliar with it), but it seems to be working fine.
Any ideas appreciated
In gem file declare
gem 'yajl-ruby'
It is used to Parse and encode multiple JSON objects to and from streams or strings continuous.
And require 'yajl/json_gem'
in config/application.rb

Resources