I'm using a free Nitrous.IO box and the app runs fine in development mode but this is what i am getting in production mode:
=> Booting Puma
=> Rails 4.0.0 application starting in production on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Puma 2.8.1 starting...
* Min threads: 0, max threads: 16
* Environment: production
* Listening on tcp://0.0.0.0:3000
I, [2014-03-31T01:21:24.636846 #25073] INFO -- : Started GET "/" for 50.9.170.255 at 2014-03-31 01:21:24 +0000
I, [2014-03-31T01:21:24.666459 #25073] INFO -- : Processing by PostsController#index as HTML
E, [2014-03-31T01:21:24.690904 #25073] ERROR -- : PG::UndefinedTable: ERROR: relation "users" does not exist
LINE 1: SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDE...
^
: SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
I, [2014-03-31T01:21:24.692268 #25073] INFO -- : Completed 500 Internal Server Error in 25ms
F, [2014-03-31T01:21:24.695776 #25073] FATAL -- :
ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "users" does not exist
LINE 1: SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDE...
^
: SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1):
activerecord (4.0.0) lib/active_record/connection_adapters/postgresql_adapter.rb:768:in `async_exec'
activerecord (4.0.0) lib/active_record/connection_adapters/postgresql_adapter.rb:768:in `exec_no_cache'
activerecord (4.0.0) lib/active_record/connection_adapters/postgresql/database_statements.rb:138:in `block in exec_query'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract_adapter.rb:425:in `block in log'
activesupport (4.0.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract_adapter.rb:420:in `log'
activerecord (4.0.0) lib/active_record/connection_adapters/postgresql/database_statements.rb:137:in `exec_query'
activerecord (4.0.0) lib/active_record/connection_adapters/postgresql_adapter.rb:885:in `select'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/database_statements.rb:24:in `select_all'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/query_cache.rb:61:in `block in select_all'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/query_cache.rb:76:in `cache_sql'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/query_cache.rb:61:in `select_all'
activerecord (4.0.0) lib/active_record/querying.rb:36:in `find_by_sql'
activerecord (4.0.0) lib/active_record/relation.rb:585:in `exec_queries'
activerecord (4.0.0) lib/active_record/relation.rb:471:in `load'
activerecord (4.0.0) lib/active_record/relation.rb:220:in `to_a'
activerecord (4.0.0) lib/active_record/relation/finder_methods.rb:325:in `find_first'
activerecord (4.0.0) lib/active_record/relation/finder_methods.rb:90:in `first'
activerecord-deprecated_finders (1.0.3) lib/active_record/deprecated_finders/relation.rb:129:in `first'
orm_adapter (0.5.0) lib/orm_adapter/adapters/active_record.rb:17:in `get'
devise (3.2.4) lib/devise/models/authenticatable.rb:208:in `serialize_from_session'
devise (3.2.4) lib/devise.rb:462:in `block (2 levels) in configure_warden!'
warden (1.2.3) lib/warden/session_serializer.rb:34:in `fetch'
warden (1.2.3) lib/warden/proxy.rb:212:in `user'
warden (1.2.3) lib/warden/proxy.rb:318:in `_perform_authentication'
warden (1.2.3) lib/warden/proxy.rb:127:in `authenticate!'
devise (3.2.4) lib/devise/controllers/helpers.rb:50:in `authenticate_user!'
activesupport (4.0.0) lib/active_support/callbacks.rb:417:in `_run__2080870772581885230__process_action__callbacks'
activesupport (4.0.0) lib/active_support/callbacks.rb:80:in `run_callbacks'
actionpack (4.0.0) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (4.0.0) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
activesupport (4.0.0) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.0.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.0.0) lib/active_support/notifications.rb:159:in `instrument'
actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.0.0) lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
activerecord (4.0.0) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.0.0) lib/abstract_controller/base.rb:136:in `process'
actionpack (4.0.0) lib/abstract_controller/rendering.rb:44:in `process'
actionpack (4.0.0) lib/action_controller/metal.rb:195:in `dispatch'
actionpack (4.0.0) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.0.0) lib/action_controller/metal.rb:231:in `block in action'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:80:in `call'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:48:in `call'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:71:in `block in call'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `each'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `call'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:655: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 `catch'
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.0) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.0.0) 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.0) lib/action_dispatch/middleware/cookies.rb:486:in `call'
activerecord (4.0.0) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.0.0) lib/active_support/callbacks.rb:373:in `_run__2769160116473194702__call__callbacks'
activesupport (4.0.0) lib/active_support/callbacks.rb:80:in `run_callbacks'
actionpack (4.0.0) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tagged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `call'
actionpack (4.0.0) 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.0) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
railties (4.0.0) lib/rails/engine.rb:511:in `call'
railties (4.0.0) lib/rails/application.rb:97:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
puma (2.8.1) lib/puma/server.rb:490:in `handle_request'
puma (2.8.1) lib/puma/server.rb:361:in `process_client'
puma (2.8.1) lib/puma/server.rb:254:in `block in run'
puma (2.8.1) lib/puma/thread_pool.rb:92:in `call'
puma (2.8.1) lib/puma/thread_pool.rb:92:in `block in spawn_thread'
UPDATE:
I managed to create the productoction database by running the db:create and I can start in production mode but none of my css is loading so it was recommened I run the command below but get rake aborted!
After running
bundle exec rake assets:precompile RAILS_ENV=production
I get this
rake aborted!
Sass::SyntaxError: Invalid CSS after " background:": expected pseudoclass or pseudoelement, was "/* homepage */"
(in /home/action/booklist/app/assets/stylesheets/application.css)
(sass):1186
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:1147:in `expected'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:1085:in `expected'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:1067:in `expr!'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:794:in `pseudo'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:678:in `simple_selector_sequence'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:640:in `_selector'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:619:in `selector'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:603:in `selector_sequence'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:528:in `ruleset'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:553:in `block_child'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:546:in `block_contents'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:82:in `stylesheet'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:27:in `parse'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/engine.rb:342:in `_to_tree'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/engine.rb:315:in `_render'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/engine.rb:262:in `render'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/sass_compressor.rb:24:in `evaluate'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets- 2.11.0/lib/sprockets/context.rb:197:in `block in evaluate'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/context.rb:194:in `each'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/context.rb:194:in `evaluate'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/bundled_asset.rb:25:in `initialize'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/base.rb:377:in `new'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/base.rb:377:in `build_asset'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/index.rb:94:in `block in build_asset'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/caching.rb:58:in `cache_asset'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/index.rb:93:in `build_asset'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/base.rb:287:in `find_asset'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/index.rb:61:in `find_asset'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:211:in `block in find_asset'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:257:in `benchmark'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:210:in `find_asset'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:119:in `block in compile'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:118:in `each'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:118:in `compile'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:60:in `block (3 levels) in define'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/rake/sprocketstask.rb:146:in `with_logger'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:59:in `block (2 levels) in define'
/home/action/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval'
/home/action/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => assets:precompile
Related
I'm trying to upgrade an old site from Rails5.2 to 6.0 on the way to 6.1 - the recommended path.
I am getting various errors about wrong number of arguments, some of which I have managed to clear by updating or removing various gems. Finally I'm stuck on this one:
.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/actionpack-6.0.0/lib/action_dispatch/middleware/static.rb:110:in `initialize': wrong number of arguments (given 3, expected 2) (ArgumentError)
How do I debug this and what is the underlying problem causing all the arguments errors?
Full stack track is:
/Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/actionpack-6.0.0/lib/action_dispatch/middleware/static.rb:110:in `initialize': wrong number of arguments (given 3, expected 2) (ArgumentError)
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/actionpack-6.0.0/lib/action_dispatch/middleware/stack.rb:37:in `new'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/actionpack-6.0.0/lib/action_dispatch/middleware/stack.rb:37:in `build'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/actionpack-6.0.0/lib/action_dispatch/middleware/stack.rb:131:in `block in build'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/actionpack-6.0.0/lib/action_dispatch/middleware/stack.rb:127:in `each'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/actionpack-6.0.0/lib/action_dispatch/middleware/stack.rb:127:in `inject'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/actionpack-6.0.0/lib/action_dispatch/middleware/stack.rb:127:in `build'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.0.0/lib/rails/engine.rb:512:in `block in app'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.0.0/lib/rails/engine.rb:508:in `synchronize'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.0.0/lib/rails/engine.rb:508:in `app'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.0.0/lib/rails/application/finisher.rb:97:in `block in <module:Finisher>'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.0.0/lib/rails/initializable.rb:32:in `instance_exec'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.0.0/lib/rails/initializable.rb:32:in `run'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.0.0/lib/rails/initializable.rb:61:in `block in run_initializers'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:347:in `each'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:347:in `call'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.0.0/lib/rails/initializable.rb:60:in `run_initializers'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.0.0/lib/rails/application.rb:363:in `initialize!'
from /Users/will/Sites/projects/ggavatar/app/config/environment.rb:5:in `<top (required)>'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `block in require'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:291:in `load_dependency'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `require'
from config.ru:3:in `block in <main>'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/server.rb:349:in `build_app_and_options_from_config'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/server.rb:249:in `app'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/server.rb:422:in `wrapped_app'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.0.0/lib/rails/commands/server/server_command.rb:77:in `log_to_stdout'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.0.0/lib/rails/commands/server/server_command.rb:37:in `start'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.0.0/lib/rails/commands/server/server_command.rb:147:in `block in perform'
from <internal:kernel>:90:in `tap'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.0.0/lib/rails/commands/server/server_command.rb:138:in `perform'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.0.0/lib/rails/command/base.rb:65:in `perform'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.0.0/lib/rails/command.rb:46:in `invoke'
from /Users/will/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-6.0.0/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
UPDATE
this blew up again shortly after the previous fix. Same error but new stack trace. I have a feeling it is to do with the cookies_serializer but I might be wrong. I have set it to hybrid according to instructions in the rails guides.
ArgumentError (wrong number of arguments (given 2, expected 1)):
json (1.8.6) lib/json/common.rb:155:in `initialize'
json (1.8.6) lib/json/common.rb:155:in `new'
json (1.8.6) lib/json/common.rb:155:in `parse'
activesupport (6.0.3.5) lib/active_support/json/decoding.rb:23:in `decode'
actionpack (6.0.3.5) lib/action_dispatch/middleware/cookies.rb:507:in `load'
actionpack (6.0.3.5) lib/action_dispatch/middleware/cookies.rb:543:in `deserialize'
actionpack (6.0.3.5) lib/action_dispatch/middleware/cookies.rb:627:in `parse'
actionpack (6.0.3.5) lib/action_dispatch/middleware/cookies.rb:461:in `[]'
actionpack (6.0.3.5) lib/action_dispatch/middleware/session/cookie_store.rb:114:in `get_cookie'
actionpack (6.0.3.5) lib/action_dispatch/middleware/session/cookie_store.rb:89:in `block (2 levels) in unpacked_cookie_data'
actionpack (6.0.3.5) lib/action_dispatch/middleware/session/abstract_store.rb:53:in `stale_session_check!'
actionpack (6.0.3.5) lib/action_dispatch/middleware/session/cookie_store.rb:88:in `block in unpacked_cookie_data'
rack (2.2.3) lib/rack/request.rb:69:in `fetch'
rack (2.2.3) lib/rack/request.rb:69:in `fetch_header'
actionpack (6.0.3.5) lib/action_dispatch/middleware/session/cookie_store.rb:87:in `unpacked_cookie_data'
actionpack (6.0.3.5) lib/action_dispatch/middleware/session/cookie_store.rb:81:in `block in extract_session_id'
actionpack (6.0.3.5) lib/action_dispatch/middleware/session/abstract_store.rb:53:in `stale_session_check!'
actionpack (6.0.3.5) lib/action_dispatch/middleware/session/cookie_store.rb:80:in `extract_session_id'
actionpack (6.0.3.5) lib/action_dispatch/request/session.rb:54:in `block in id'
actionpack (6.0.3.5) lib/action_dispatch/request/session.rb:53:in `fetch'
actionpack (6.0.3.5) lib/action_dispatch/request/session.rb:53:in `id'
actionpack (6.0.3.5) lib/action_dispatch/request/session.rb:72:in `id'
rack (2.2.3) lib/rack/session/abstract/id.rb:329:in `current_session_id'
rack (2.2.3) lib/rack/session/abstract/id.rb:335:in `session_exists?'
actionpack (6.0.3.5) lib/action_dispatch/request/session.rb:203:in `exists?'
actionpack (6.0.3.5) lib/action_dispatch/request/session.rb:226:in `load_for_read!'
actionpack (6.0.3.5) lib/action_dispatch/request/session.rb:92:in `[]'
warden (1.2.9) lib/warden/session_serializer.rb:31:in `fetch'
warden (1.2.9) lib/warden/proxy.rb:224:in `user'
warden (1.2.9) lib/warden/proxy.rb:334:in `_perform_authentication'
warden (1.2.9) lib/warden/proxy.rb:110:in `authenticate'
warden (1.2.9) lib/warden/proxy.rb:120:in `authenticate?'
devise (4.7.3) app/controllers/devise_controller.rb:109:in `require_no_authentication'
activesupport (6.0.3.5) lib/active_support/callbacks.rb:428:in `block in make_lambda'
activesupport (6.0.3.5) lib/active_support/callbacks.rb:181:in `block (2 levels) in halting_and_conditional'
actionpack (6.0.3.5) lib/abstract_controller/callbacks.rb:34:in `block (2 levels) in <module:Callbacks>'
activesupport (6.0.3.5) lib/active_support/callbacks.rb:182:in `block in halting_and_conditional'
activesupport (6.0.3.5) lib/active_support/callbacks.rb:513:in `block in invoke_before'
activesupport (6.0.3.5) lib/active_support/callbacks.rb:513:in `each'
activesupport (6.0.3.5) lib/active_support/callbacks.rb:513:in `invoke_before'
activesupport (6.0.3.5) lib/active_support/callbacks.rb:134:in `run_callbacks'
actionpack (6.0.3.5) lib/abstract_controller/callbacks.rb:41:in `process_action'
actionpack (6.0.3.5) lib/action_controller/metal/rescue.rb:22:in `process_action'
actionpack (6.0.3.5) lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
activesupport (6.0.3.5) lib/active_support/notifications.rb:180:in `block in instrument'
activesupport (6.0.3.5) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (6.0.3.5) lib/active_support/notifications.rb:180:in `instrument'
actionpack (6.0.3.5) lib/action_controller/metal/instrumentation.rb:32:in `process_action'
actionpack (6.0.3.5) lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
activerecord (6.0.3.5) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
actionpack (6.0.3.5) lib/abstract_controller/base.rb:136:in `process'
actionview (6.0.3.5) lib/action_view/rendering.rb:39:in `process'
actionpack (6.0.3.5) lib/action_controller/metal.rb:190:in `dispatch'
actionpack (6.0.3.5) lib/action_controller/metal.rb:254:in `dispatch'
actionpack (6.0.3.5) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
actionpack (6.0.3.5) lib/action_dispatch/routing/route_set.rb:33:in `serve'
actionpack (6.0.3.5) lib/action_dispatch/routing/mapper.rb:18:in `block in <class:Constraints>'
actionpack (6.0.3.5) lib/action_dispatch/routing/mapper.rb:48:in `serve'
actionpack (6.0.3.5) lib/action_dispatch/journey/router.rb:49:in `block in serve'
actionpack (6.0.3.5) lib/action_dispatch/journey/router.rb:32:in `each'
actionpack (6.0.3.5) lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack (6.0.3.5) lib/action_dispatch/routing/route_set.rb:834:in `call'
scout_apm (4.0.4) lib/scout_apm/instant/middleware.rb:53:in `call'
scout_apm (4.0.4) lib/scout_apm/middleware.rb:20:in `call'
bullet (6.1.4) lib/bullet/rack.rb:12:in `call'
warden (1.2.9) lib/warden/manager.rb:36:in `block in call'
warden (1.2.9) lib/warden/manager.rb:34:in `catch'
warden (1.2.9) lib/warden/manager.rb:34:in `call'
rack (2.2.3) lib/rack/tempfile_reaper.rb:15:in `call'
rack (2.2.3) lib/rack/etag.rb:27:in `call'
rack (2.2.3) lib/rack/conditional_get.rb:27:in `call'
rack (2.2.3) lib/rack/head.rb:12:in `call'
actionpack (6.0.3.5) lib/action_dispatch/http/content_security_policy.rb:18:in `call'
rack (2.2.3) lib/rack/session/abstract/id.rb:266:in `context'
rack (2.2.3) lib/rack/session/abstract/id.rb:260:in `call'
actionpack (6.0.3.5) lib/action_dispatch/middleware/cookies.rb:648:in `call'
activerecord (6.0.3.5) lib/active_record/migration.rb:567:in `call'
actionpack (6.0.3.5) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
activesupport (6.0.3.5) lib/active_support/callbacks.rb:101:in `run_callbacks'
actionpack (6.0.3.5) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack (6.0.3.5) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (6.0.3.5) lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
rollbar (3.1.2) lib/rollbar/middleware/rails/rollbar.rb:25:in `block in call'
rollbar (3.1.2) lib/rollbar.rb:145:in `scoped'
rollbar (3.1.2) lib/rollbar/middleware/rails/rollbar.rb:22:in `call'
actionpack (6.0.3.5) lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'
rollbar (3.1.2) lib/rollbar/middleware/rails/show_exceptions.rb:22:in `call_with_rollbar'
web-console (4.1.0) lib/web_console/middleware.rb:132:in `call_app'
web-console (4.1.0) lib/web_console/middleware.rb:28:in `block in call'
web-console (4.1.0) lib/web_console/middleware.rb:17:in `catch'
web-console (4.1.0) lib/web_console/middleware.rb:17:in `call'
actionpack (6.0.3.5) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (6.0.3.5) lib/rails/rack/logger.rb:37:in `call_app'
railties (6.0.3.5) lib/rails/rack/logger.rb:26:in `block in call'
activesupport (6.0.3.5) lib/active_support/tagged_logging.rb:80:in `block in tagged'
activesupport (6.0.3.5) lib/active_support/tagged_logging.rb:28:in `tagged'
activesupport (6.0.3.5) lib/active_support/tagged_logging.rb:80:in `tagged'
railties (6.0.3.5) lib/rails/rack/logger.rb:26:in `call'
sprockets-rails (3.2.2) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (6.0.3.5) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
request_store (1.5.0) lib/request_store/middleware.rb:19:in `call'
rack-timeout (0.6.0) lib/rack/timeout/core.rb:151:in `block in call'
rack-timeout (0.6.0) lib/rack/timeout/support/timeout.rb:19:in `timeout'
rack-timeout (0.6.0) lib/rack/timeout/core.rb:150:in `call'
actionpack (6.0.3.5) lib/action_dispatch/middleware/request_id.rb:27:in `call'
rack (2.2.3) lib/rack/method_override.rb:24:in `call'
rack (2.2.3) lib/rack/runtime.rb:22:in `call'
activesupport (6.0.3.5) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (6.0.3.5) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (6.0.3.5) lib/action_dispatch/middleware/static.rb:126:in `call'
rack (2.2.3) lib/rack/sendfile.rb:110:in `call'
actionpack (6.0.3.5) lib/action_dispatch/middleware/host_authorization.rb:82:in `call'
rack-mini-profiler (2.3.1) lib/mini_profiler/profiler.rb:373:in `call'
railties (6.0.3.5) lib/rails/engine.rb:527:in `call'
railties (6.0.3.5) lib/rails/railtie.rb:190:in `public_send'
railties (6.0.3.5) lib/rails/railtie.rb:190:in `method_missing'
puma (5.2.2) lib/puma/configuration.rb:248:in `call'
puma (5.2.2) lib/puma/request.rb:76:in `block in handle_request'
puma (5.2.2) lib/puma/thread_pool.rb:337:in `with_force_shutdown'
puma (5.2.2) lib/puma/request.rb:75:in `handle_request'
puma (5.2.2) lib/puma/server.rb:431:in `process_client'
puma (5.2.2) lib/puma/thread_pool.rb:145:in `block in spawn_thread'
source=rack-timeout id=27e40f2f-9e32-4ba3-9433-0da9a8037c07 timeout=15000ms service=407ms state=completed
UPDATE 2 - switch to rails 6.1.3
stack:
ArgumentError (wrong number of arguments (given 2, expected 1)):
json (1.8.6) lib/json/common.rb:155:in `initialize'
json (1.8.6) lib/json/common.rb:155:in `new'
json (1.8.6) lib/json/common.rb:155:in `parse'
activesupport (6.1.3) lib/active_support/json/decoding.rb:23:in `decode'
actionpack (6.1.3) lib/action_dispatch/middleware/cookies.rb:543:in `load'
actionpack (6.1.3) lib/action_dispatch/middleware/cookies.rb:579:in `deserialize'
actionpack (6.1.3) lib/action_dispatch/middleware/cookies.rb:668:in `parse'
actionpack (6.1.3) lib/action_dispatch/middleware/cookies.rb:482:in `[]'
actionpack (6.1.3) lib/action_dispatch/middleware/session/cookie_store.rb:114:in `get_cookie'
actionpack (6.1.3) lib/action_dispatch/middleware/session/cookie_store.rb:89:in `block (2 levels) in unpacked_cookie_data'
actionpack (6.1.3) lib/action_dispatch/middleware/session/abstract_store.rb:53:in `stale_session_check!'
actionpack (6.1.3) lib/action_dispatch/middleware/session/cookie_store.rb:88:in `block in unpacked_cookie_data'
rack (2.2.3) lib/rack/request.rb:69:in `fetch'
rack (2.2.3) lib/rack/request.rb:69:in `fetch_header'
actionpack (6.1.3) lib/action_dispatch/middleware/session/cookie_store.rb:87:in `unpacked_cookie_data'
actionpack (6.1.3) lib/action_dispatch/middleware/session/cookie_store.rb:81:in `block in extract_session_id'
actionpack (6.1.3) lib/action_dispatch/middleware/session/abstract_store.rb:53:in `stale_session_check!'
actionpack (6.1.3) lib/action_dispatch/middleware/session/cookie_store.rb:80:in `extract_session_id'
actionpack (6.1.3) lib/action_dispatch/request/session.rb:54:in `block in id'
actionpack (6.1.3) lib/action_dispatch/request/session.rb:53:in `fetch'
actionpack (6.1.3) lib/action_dispatch/request/session.rb:53:in `id'
actionpack (6.1.3) lib/action_dispatch/request/session.rb:72:in `id'
rack (2.2.3) lib/rack/session/abstract/id.rb:329:in `current_session_id'
rack (2.2.3) lib/rack/session/abstract/id.rb:335:in `session_exists?'
actionpack (6.1.3) lib/action_dispatch/request/session.rb:203:in `exists?'
actionpack (6.1.3) lib/action_dispatch/request/session.rb:226:in `load_for_read!'
actionpack (6.1.3) lib/action_dispatch/request/session.rb:92:in `[]'
warden (1.2.9) lib/warden/session_serializer.rb:31:in `fetch'
warden (1.2.9) lib/warden/proxy.rb:224:in `user'
warden (1.2.9) lib/warden/proxy.rb:334:in `_perform_authentication'
warden (1.2.9) lib/warden/proxy.rb:110:in `authenticate'
warden (1.2.9) lib/warden/proxy.rb:120:in `authenticate?'
devise (4.7.3) app/controllers/devise_controller.rb:109:in `require_no_authentication'
activesupport (6.1.3) lib/active_support/callbacks.rb:427:in `block in make_lambda'
activesupport (6.1.3) lib/active_support/callbacks.rb:179:in `block (2 levels) in halting_and_conditional'
actionpack (6.1.3) lib/abstract_controller/callbacks.rb:34:in `block (2 levels) in <module:Callbacks>'
activesupport (6.1.3) lib/active_support/callbacks.rb:180:in `block in halting_and_conditional'
activesupport (6.1.3) lib/active_support/callbacks.rb:512:in `block in invoke_before'
activesupport (6.1.3) lib/active_support/callbacks.rb:512:in `each'
activesupport (6.1.3) lib/active_support/callbacks.rb:512:in `invoke_before'
activesupport (6.1.3) lib/active_support/callbacks.rb:115:in `block in run_callbacks'
activesupport (6.1.3) lib/active_support/callbacks.rb:137:in `run_callbacks'
actionpack (6.1.3) lib/abstract_controller/callbacks.rb:41:in `process_action'
actionpack (6.1.3) lib/action_controller/metal/rescue.rb:22:in `process_action'
actionpack (6.1.3) lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
activesupport (6.1.3) lib/active_support/notifications.rb:203:in `block in instrument'
activesupport (6.1.3) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (6.1.3) lib/active_support/notifications.rb:203:in `instrument'
actionpack (6.1.3) lib/action_controller/metal/instrumentation.rb:33:in `process_action'
actionpack (6.1.3) lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
activerecord (6.1.3) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
actionpack (6.1.3) lib/abstract_controller/base.rb:165:in `process'
actionview (6.1.3) lib/action_view/rendering.rb:39:in `process'
actionpack (6.1.3) lib/action_controller/metal.rb:190:in `dispatch'
actionpack (6.1.3) lib/action_controller/metal.rb:254:in `dispatch'
actionpack (6.1.3) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
actionpack (6.1.3) lib/action_dispatch/routing/route_set.rb:33:in `serve'
actionpack (6.1.3) lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
actionpack (6.1.3) lib/action_dispatch/routing/mapper.rb:49:in `serve'
actionpack (6.1.3) lib/action_dispatch/journey/router.rb:50:in `block in serve'
actionpack (6.1.3) lib/action_dispatch/journey/router.rb:32:in `each'
actionpack (6.1.3) lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack (6.1.3) lib/action_dispatch/routing/route_set.rb:842:in `call'
scout_apm (4.0.4) lib/scout_apm/instant/middleware.rb:53:in `call'
scout_apm (4.0.4) lib/scout_apm/middleware.rb:20:in `call'
bullet (6.1.4) lib/bullet/rack.rb:12:in `call'
warden (1.2.9) lib/warden/manager.rb:36:in `block in call'
warden (1.2.9) lib/warden/manager.rb:34:in `catch'
warden (1.2.9) lib/warden/manager.rb:34:in `call'
rack (2.2.3) lib/rack/tempfile_reaper.rb:15:in `call'
rack (2.2.3) lib/rack/etag.rb:27:in `call'
rack (2.2.3) lib/rack/conditional_get.rb:27:in `call'
rack (2.2.3) lib/rack/head.rb:12:in `call'
actionpack (6.1.3) lib/action_dispatch/http/permissions_policy.rb:22:in `call'
actionpack (6.1.3) lib/action_dispatch/http/content_security_policy.rb:18:in `call'
rack (2.2.3) lib/rack/session/abstract/id.rb:266:in `context'
rack (2.2.3) lib/rack/session/abstract/id.rb:260:in `call'
actionpack (6.1.3) lib/action_dispatch/middleware/cookies.rb:689:in `call'
activerecord (6.1.3) lib/active_record/migration.rb:601:in `call'
actionpack (6.1.3) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
activesupport (6.1.3) lib/active_support/callbacks.rb:98:in `run_callbacks'
actionpack (6.1.3) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack (6.1.3) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (6.1.3) lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
rollbar (3.1.2) lib/rollbar/middleware/rails/rollbar.rb:25:in `block in call'
rollbar (3.1.2) lib/rollbar.rb:145:in `scoped'
rollbar (3.1.2) lib/rollbar/middleware/rails/rollbar.rb:22:in `call'
actionpack (6.1.3) lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
rollbar (3.1.2) lib/rollbar/middleware/rails/show_exceptions.rb:22:in `call_with_rollbar'
web-console (4.1.0) lib/web_console/middleware.rb:132:in `call_app'
web-console (4.1.0) lib/web_console/middleware.rb:28:in `block in call'
web-console (4.1.0) lib/web_console/middleware.rb:17:in `catch'
web-console (4.1.0) lib/web_console/middleware.rb:17:in `call'
actionpack (6.1.3) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (6.1.3) lib/rails/rack/logger.rb:37:in `call_app'
railties (6.1.3) lib/rails/rack/logger.rb:26:in `block in call'
activesupport (6.1.3) lib/active_support/tagged_logging.rb:99:in `block in tagged'
activesupport (6.1.3) lib/active_support/tagged_logging.rb:37:in `tagged'
activesupport (6.1.3) lib/active_support/tagged_logging.rb:99:in `tagged'
railties (6.1.3) lib/rails/rack/logger.rb:26:in `call'
sprockets-rails (3.2.2) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (6.1.3) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
request_store (1.5.0) lib/request_store/middleware.rb:19:in `call'
rack-timeout (0.6.0) lib/rack/timeout/core.rb:151:in `block in call'
rack-timeout (0.6.0) lib/rack/timeout/support/timeout.rb:19:in `timeout'
rack-timeout (0.6.0) lib/rack/timeout/core.rb:150:in `call'
actionpack (6.1.3) lib/action_dispatch/middleware/request_id.rb:26:in `call'
rack (2.2.3) lib/rack/method_override.rb:24:in `call'
rack (2.2.3) lib/rack/runtime.rb:22:in `call'
activesupport (6.1.3) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (6.1.3) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (6.1.3) lib/action_dispatch/middleware/static.rb:24:in `call'
rack (2.2.3) lib/rack/sendfile.rb:110:in `call'
actionpack (6.1.3) lib/action_dispatch/middleware/host_authorization.rb:98:in `call'
rack-mini-profiler (2.3.1) lib/mini_profiler/profiler.rb:373:in `call'
railties (6.1.3) lib/rails/engine.rb:539:in `call'
railties (6.1.3) lib/rails/railtie.rb:207:in `public_send'
railties (6.1.3) lib/rails/railtie.rb:207:in `method_missing'
puma (5.2.2) lib/puma/configuration.rb:248:in `call'
puma (5.2.2) lib/puma/request.rb:76:in `block in handle_request'
puma (5.2.2) lib/puma/thread_pool.rb:337:in `with_force_shutdown'
puma (5.2.2) lib/puma/request.rb:75:in `handle_request'
puma (5.2.2) lib/puma/server.rb:431:in `process_client'
puma (5.2.2) lib/puma/thread_pool.rb:145:in `block in spawn_thread'
source=rack-timeout id=ef317074-a4fb-4e9e-a6f4-cd2ddd1db3c5 timeout=15000ms service=367ms state=completed
EDIT - Looks like you fixed it by upgrading to a newer release. I expect if you look at the changes between your versions they will have fixed the issue I've outlined below.
I'm assuming you upgraded to Ruby 3.0.0 at the same time as upgrading Rails. I've recently done exactly the same thing, and can with some certainty say that you're hitting an issue with changes to how keyword arguments are handled in Ruby 3.
You should read this article which explains the changes: https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
Here is an example of how I had to fix this within my code.
Before Ruby 3:
def self.fetch(*args)
new(*args).fetch
end
def self.update(property, category: "default", site:, value:)
args = [property, category: category, site: site]
new(*args).update(value)
end
After Ruby 3:
def self.fetch(*args, **kwargs)
new(*args, **kwargs).fetch
end
def self.update(property, category: "default", site:, value:)
args = [property]
kwargs = { category: category, site: site }
new(*args, **kwargs).update(value)
end
I found a fix for this.
There's an issue with parsing JSON:
json (1.8.6) lib/json/common.rb:155:in parse'`
The fix for that I found here: https://github.com/flori/json/issues/399#issuecomment-734863279
It means adding a config/initializers/json.rb file to override the current parse:
module JSON
module_function
def parse(source, opts = {})
Parser.new(source, **opts).parse
end
end
Every time i make an action in my web application i get this enormous error which i really can't understand .
This console log is generated after i click "add to favorites" to one classified, which from the SQL side works fine.
After the click i get the error , but if i click "back" in my browser i see the item is "my favorite" .
The error follows :
Started PUT "/classifieds/72/favorite?type=favorite" for 127.0.0.1 at 2016-09-08 21:58:36 +0300
Processing by ClassifiedsController#favorite as HTML
Parameters: {"authenticity_token"=>"yynpSeBi2Jsr+GzGZZWbxmBCZSxXfOvG1NU9L3lX3pafRbtka779xUB18MkZUFPxtvQh7O4siIpPe5gl8XGbyQ==", "type"=>"favorite", "id"=>"72"}
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 4], ["LIMIT", 1]]
Classified Load (0.1ms) SELECT "classifieds".* FROM "classifieds" WHERE "classifieds"."id" = ? LIMIT ? [["id", 72], ["LIMIT", 1]]
(0.1ms) begin transaction
SOLR Request (4.4ms) [ path=update parameters={} ]
SQL (0.4ms) INSERT INTO "favorite_classifieds" ("user_id", "classified_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["user_id", 4], ["classified_id", 72], ["created_at", 2016-09-08 18:58:36 UTC], ["updated_at", 2016-09-08 18:58:36 UTC]]
(20.3ms) commit transaction
DEPRECATION WARNING: `redirect_to :back` is deprecated and will be removed from Rails 5.1. Please use `redirect_back(fallback_location: fallback_location)` where `fallback_location` represents the location to use if the request has no HTTP referer information. (called from favorite at /home/frcake/workspace/Site/brokerv1/brokr/app/controllers/classifieds_controller.rb:79)
Redirected to http://localhost:3000/classifieds/72
SOLR Request (12.5ms) [ path=update parameters={} ]
Completed 500 Internal Server Error in 50ms (ActiveRecord: 21.1ms)
RSolr::Error::Http (RSolr::Error::Http - 500 Internal Server Error
Error: 'java.nio.file.NoSuchFileException: /home/frcake/workspace/Site/brokerv1/brokr/solr/development/data/index/_41.fdt','trace'=>'java.lang.RuntimeException: java.nio.file.NoSuchFileException: /home/frcake/workspace/Site/brokerv1/brokr/solr/development/data/index/_41.fdt
URI: http://localhost:8982/solr/development/update?wt=ruby
Request Headers: {"Content-Type"=>"text/xml"}
Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><commit softCommit=\"false\"/>"
Backtrace: /home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rsolr-1.1.2/lib/rsolr/client.rb:288:in `adapt_response'
/home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rsolr-1.1.2/lib/rsolr/client.rb:189:in `execute'
/home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rsolr-1.1.2/lib/rsolr/client.rb:175:in `send_and_receive'
/home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/sunspot_rails-2.2.6/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
/home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/notifications.rb:164:in `block in instrument'
/home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/notifications.rb:164:in `instrument'
/home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/sunspot_rails-2.2.6/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'
/home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rsolr-1.1.2/lib/rsolr/client.rb:84:in `update'
/home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rsolr-1.1.2/lib/rsolr/client.rb:113:in `commit'):
rsolr (1.1.2) lib/rsolr/client.rb:288:in `adapt_response'
rsolr (1.1.2) lib/rsolr/client.rb:189:in `execute'
rsolr (1.1.2) lib/rsolr/client.rb:175:in `send_and_receive'
sunspot_rails (2.2.6) lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
activesupport (5.0.0.1) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (5.0.0.1) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
activesupport (5.0.0.1) lib/active_support/notifications.rb:164:in `instrument'
sunspot_rails (2.2.6) lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'
rsolr (1.1.2) lib/rsolr/client.rb:84:in `update'
rsolr (1.1.2) lib/rsolr/client.rb:113:in `commit'
sunspot (2.2.6) lib/sunspot/session.rb:123:in `commit'
sunspot (2.2.6) lib/sunspot/session.rb:220:in `commit_if_dirty'
sunspot (2.2.6) lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `commit_if_dirty'
sunspot (2.2.6) lib/sunspot.rb:554:in `commit_if_dirty'
sunspot_rails (2.2.6) lib/sunspot/rails/request_lifecycle.rb:26:in `block (2 levels) in included'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:396:in `instance_exec'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:396:in `block in make_lambda'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:218:in `call'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:218:in `block in halting'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:456:in `call'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:456:in `block in call'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:456:in `each'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:456:in `call'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:101:in `__run_callbacks__'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:90:in `run_callbacks'
actionpack (5.0.0.1) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (5.0.0.1) lib/action_controller/metal/rescue.rb:20:in `process_action'
actionpack (5.0.0.1) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
activesupport (5.0.0.1) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (5.0.0.1) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
activesupport (5.0.0.1) lib/active_support/notifications.rb:164:in `instrument'
actionpack (5.0.0.1) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (5.0.0.1) lib/action_controller/metal/params_wrapper.rb:248:in `process_action'
activerecord (5.0.0.1) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (5.0.0.1) lib/abstract_controller/base.rb:126:in `process'
actionview (5.0.0.1) lib/action_view/rendering.rb:30:in `process'
actionpack (5.0.0.1) lib/action_controller/metal.rb:190:in `dispatch'
actionpack (5.0.0.1) lib/action_controller/metal.rb:262:in `dispatch'
actionpack (5.0.0.1) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
actionpack (5.0.0.1) lib/action_dispatch/routing/route_set.rb:32:in `serve'
actionpack (5.0.0.1) lib/action_dispatch/journey/router.rb:39:in `block in serve'
actionpack (5.0.0.1) lib/action_dispatch/journey/router.rb:26:in `each'
actionpack (5.0.0.1) lib/action_dispatch/journey/router.rb:26:in `serve'
actionpack (5.0.0.1) lib/action_dispatch/routing/route_set.rb:725:in `call'
warden (1.2.6) lib/warden/manager.rb:35:in `block in call'
warden (1.2.6) lib/warden/manager.rb:34:in `catch'
warden (1.2.6) lib/warden/manager.rb:34:in `call'
rack (2.0.1) lib/rack/etag.rb:25:in `call'
rack (2.0.1) lib/rack/conditional_get.rb:38:in `call'
rack (2.0.1) lib/rack/head.rb:12:in `call'
rack (2.0.1) lib/rack/session/abstract/id.rb:222:in `context'
rack (2.0.1) lib/rack/session/abstract/id.rb:216:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/cookies.rb:613:in `call'
activerecord (5.0.0.1) lib/active_record/migration.rb:552:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/callbacks.rb:38:in `block in call'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:97:in `__run_callbacks__'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:750:in `_run_call_callbacks'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:90:in `run_callbacks'
actionpack (5.0.0.1) lib/action_dispatch/middleware/callbacks.rb:36:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'
web-console (3.3.1) lib/web_console/middleware.rb:131:in `call_app'
web-console (3.3.1) lib/web_console/middleware.rb:28:in `block in call'
web-console (3.3.1) lib/web_console/middleware.rb:18:in `catch'
web-console (3.3.1) lib/web_console/middleware.rb:18:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties (5.0.0.1) lib/rails/rack/logger.rb:36:in `call_app'
railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `block in call'
activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `block in tagged'
activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `tagged'
railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `call'
sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/request_id.rb:24:in `call'
rack (2.0.1) lib/rack/method_override.rb:22:in `call'
rack (2.0.1) lib/rack/runtime.rb:22:in `call'
activesupport (5.0.0.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/static.rb:136:in `call'
rack (2.0.1) lib/rack/sendfile.rb:111:in `call'
railties (5.0.0.1) lib/rails/engine.rb:522:in `call'
puma (3.6.0) lib/puma/configuration.rb:225:in `call'
puma (3.6.0) lib/puma/server.rb:578:in `handle_request'
puma (3.6.0) lib/puma/server.rb:415:in `process_client'
puma (3.6.0) lib/puma/server.rb:275:in `block in run'
puma (3.6.0) lib/puma/thread_pool.rb:116:in `call'
puma (3.6.0) lib/puma/thread_pool.rb:116:in `block in spawn_thread'
Rendering /home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout
Rendering /home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_source.html.erb
Rendered /home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (9.4ms)
Rendering /home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
Rendered /home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (4.0ms)
Rendering /home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
Rendered /home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.5ms)
Rendered /home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (36.3ms)
I followed this upvoted answer Can't reindex Sunspot SOLR - Error - RSolr::Error::Http - 500 Internal Server Error
instead of deleting the whole folder i just deleted the solr.xml file
All other commands are the same :)
When I updating to from rails 3.2 to rails 4.2 the gems are all compatible for rails 4 was cross checked with this
when I run server it will throwing error as below.
Processing by HomeController#index as HTML
Completed 500 Internal Server Error in 28ms (ActiveRecord: 0.0ms)
TypeError (incompatible marshal file format (can't be read)
format version 4.8 required; 123.34 given):
activesupport (4.2.4) lib/active_support/core_ext/marshal.rb:6:in `load'
activesupport (4.2.4) lib/active_support/core_ext/marshal.rb:6:in `load_with_autoloading'
actionpack (4.2.4) lib/action_dispatch/middleware/cookies.rb:424:in `deserialize'
actionpack (4.2.4) lib/action_dispatch/middleware/cookies.rb:516:in `[]'
actionpack (4.2.4) lib/action_dispatch/middleware/session/cookie_store.rb:114:in `get_cookie'
actionpack (4.2.4) lib/action_dispatch/middleware/session/cookie_store.rb:90:in `block in unpacked_cookie_data'
actionpack (4.2.4) lib/action_dispatch/middleware/session/abstract_store.rb:51:in `stale_session_check!'
actionpack (4.2.4) lib/action_dispatch/middleware/session/cookie_store.rb:89:in `unpacked_cookie_data'
actionpack (4.2.4) lib/action_dispatch/middleware/session/cookie_store.rb:83:in `block in extract_session_id'
actionpack (4.2.4) lib/action_dispatch/middleware/session/abstract_store.rb:51:in `stale_session_check!'
actionpack (4.2.4) lib/action_dispatch/middleware/session/cookie_store.rb:82:in `extract_session_id'
actionpack (4.2.4) lib/action_dispatch/request/session.rb:49:in `block in []'
actionpack (4.2.4) lib/action_dispatch/request/session.rb:48:in `fetch'
actionpack (4.2.4) lib/action_dispatch/request/session.rb:48:in `[]'
actionpack (4.2.4) lib/action_dispatch/request/session.rb:70:in `id'
rack (1.6.4) lib/rack/session/abstract/id.rb:282:in `current_session_id'
rack (1.6.4) lib/rack/session/abstract/id.rb:288:in `session_exists?'
actionpack (4.2.4) lib/action_dispatch/request/session.rb:152:in `exists?'
actionpack (4.2.4) lib/action_dispatch/request/session.rb:172:in `load_for_read!'
actionpack (4.2.4) lib/action_dispatch/request/session.rb:89:in `[]'
warden (1.2.3) lib/warden/session_serializer.rb:30:in `fetch'
warden (1.2.3) lib/warden/proxy.rb:212:in `user'
warden (1.2.3) lib/warden/proxy.rb:318:in `_perform_authentication'
warden (1.2.3) lib/warden/proxy.rb:104:in `authenticate'
devise (3.5.2) lib/devise/controllers/helpers.rb:120:in `current_user'
activesupport (4.2.4) lib/active_support/callbacks.rb:432:in `block in make_lambda'
activesupport (4.2.4) lib/active_support/callbacks.rb:290:in `call'
activesupport (4.2.4) lib/active_support/callbacks.rb:290:in `block (2 levels) in halting_and_conditional'
activesupport (4.2.4) lib/active_support/callbacks.rb:290:in `each'
activesupport (4.2.4) lib/active_support/callbacks.rb:290:in `all?'
activesupport (4.2.4) lib/active_support/callbacks.rb:290:in `block in halting_and_conditional'
activesupport (4.2.4) lib/active_support/callbacks.rb:497:in `call'
activesupport (4.2.4) lib/active_support/callbacks.rb:497:in `block in around'
activesupport (4.2.4) lib/active_support/callbacks.rb:505:in `call'
activesupport (4.2.4) lib/active_support/callbacks.rb:505:in `call'
activesupport (4.2.4) lib/active_support/callbacks.rb:92:in `__run_callbacks__'
activesupport (4.2.4) lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
activesupport (4.2.4) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.4) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (4.2.4) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.2.4) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
activesupport (4.2.4) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (4.2.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.2.4) lib/active_support/notifications.rb:164:in `instrument'
actionpack (4.2.4) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.2.4) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
activerecord (4.2.4) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.2.4) lib/abstract_controller/base.rb:137:in `process'
actionview (4.2.4) lib/action_view/rendering.rb:30:in `process'
actionpack (4.2.4) lib/action_controller/metal.rb:196:in `dispatch'
actionpack (4.2.4) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.2.4) lib/action_controller/metal.rb:237:in `block in action'
actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:76:in `call'
actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:76:in `dispatch'
actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:45:in `serve'
actionpack (4.2.4) lib/action_dispatch/journey/router.rb:43:in `block in serve'
actionpack (4.2.4) lib/action_dispatch/journey/router.rb:30:in `each'
actionpack (4.2.4) lib/action_dispatch/journey/router.rb:30:in `serve'
actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:821:in `call'
client_side_validations (3.2.7) lib/client_side_validations/middleware.rb:17: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 `catch'
warden (1.2.3) lib/warden/manager.rb:34:in `call'
rack (1.6.4) lib/rack/etag.rb:24:in `call'
rack (1.6.4) lib/rack/conditionalget.rb:25:in `call'
rack (1.6.4) lib/rack/head.rb:13:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/flash.rb:260:in `call'
rack (1.6.4) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.6.4) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/cookies.rb:560:in `call'
activerecord (4.2.4) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.2.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
activerecord (4.2.4) lib/active_record/migration.rb:377:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.2.4) lib/active_support/callbacks.rb:88:in `__run_callbacks__'
activesupport (4.2.4) lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
activesupport (4.2.4) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.4) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.2.4) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.2.4) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.2.4) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.2.4) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.2.4) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.2.4) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
rack (1.6.4) lib/rack/runtime.rb:18:in `call'
activesupport (4.2.4) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
rack (1.6.4) lib/rack/lock.rb:17:in `call'
rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
railties (4.2.4) lib/rails/engine.rb:518:in `call'
railties (4.2.4) lib/rails/application.rb:165:in `call'
rack (1.6.4) lib/rack/content_length.rb:15:in `call'
thin (1.6.4) lib/thin/connection.rb:86:in `block in pre_process'
thin (1.6.4) lib/thin/connection.rb:84:in `catch'
thin (1.6.4) lib/thin/connection.rb:84:in `pre_process'
thin (1.6.4) lib/thin/connection.rb:53:in `process'
thin (1.6.4) lib/thin/connection.rb:39:in `receive_data'
eventmachine (1.0.8) lib/eventmachine.rb:193:in `run_machine'
eventmachine (1.0.8) lib/eventmachine.rb:193:in `run'
thin (1.6.4) lib/thin/backends/base.rb:73:in `start'
thin (1.6.4) lib/thin/server.rb:162:in `start'
rack (1.6.4) lib/rack/handler/thin.rb:19:in `run'
rack (1.6.4) lib/rack/server.rb:286:in `start'
railties (4.2.4) lib/rails/commands/server.rb:80:in `start'
railties (4.2.4) lib/rails/commands/commands_tasks.rb:80:in `block in server'
railties (4.2.4) lib/rails/commands/commands_tasks.rb:75:in `tap'
railties (4.2.4) lib/rails/commands/commands_tasks.rb:75:in `server'
railties (4.2.4) lib/rails/commands/commands_tasks.rb:39:in `run_command!'
railties (4.2.4) lib/rails/commands.rb:17:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Is something missing for cookies or session settings or any changes required for devise?
I am facing different issue as well
Rails 4 upgrade JSON::ParseError for old sessions
Ruby on Rails TypeError
But no luck I had changed secret token.
It seem to be a checksum verification error. And in the callstack it comes just after CookieStore middleware. I'd try the following:
Empty cookies and cache in my web browser
If using server side cookie store: empty its storage (ex: empty the sessions database table when using activerecord-session_store)
Clean the content of my_app/tmp directory with rake tmp:clear
i had the same issue when i upgraded from Rails 3.2.16 to Rails 4.2.0 and it was assets problem try do the following:
bundle exec rake assets:clean
bundle exec rake assets:precompile
Update:
I think I finally solved it.. I had the following code in my Active Admin Initializer file:
module ActiveAdmin
class BaseController
with_role :admin
end
end
Removing this piece of code seems to fix the problem.
I'm setting up a new Rails 4 app, where I've just installed Active Admin on (gem 'activeadmin', github: 'gregbell/active_admin').
I can create new records from the rails console, but whenever I try to create a new record or update one within Active Admin I get the following error, which I can't seem to get my head around. Anyone who can point me in the right direction.
12:06:59 web.1 | Started GET "/admin/teams/new" for 127.0.0.1 at 2013-10-31 12:06:59 +0100
12:06:59 web.1 | Processing by Admin::TeamsController#new as HTML
12:06:59 web.1 | AdminUser Load (0.7ms) SELECT "admin_users".* FROM "admin_users" WHERE "admin_users"."id" = 1 ORDER BY "admin_users"."id" ASC LIMIT 1
12:06:59 web.1 | Completed 500 Internal Server Error in 2ms
12:06:59 web.1 |
12:06:59 web.1 | ArgumentError (wrong number of arguments (2 for 0..1)):
and this is the stack trace:
activerecord (4.0.0) lib/active_record/core.rb:180:in `initialize'
activerecord (4.0.0) lib/active_record/inheritance.rb:27:in `new'
activerecord (4.0.0) lib/active_record/inheritance.rb:27:in `new'
/Users/KennethSkou/.rvm/gems/ruby-2.0.0-p247#Todo/bundler/gems/active_admin-0f663e3ad728/lib/active_admin/resource_controller/data_access.rb:142:in `build_new_resource'
/Users/KennethSkou/.rvm/gems/ruby-2.0.0-p247#Todo/bundler/gems/active_admin-0f663e3ad728/lib/active_admin/resource_controller/data_access.rb:129:in `build_resource'
inherited_resources (1.4.1) lib/inherited_resources/actions.rb:19:in `new'
actionpack (4.0.0) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (4.0.0) lib/abstract_controller/base.rb:189:in `process_action'
actionpack (4.0.0) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (4.0.0) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
activesupport (4.0.0) lib/active_support/callbacks.rb:443:in `_run__3851194588154266790__process_action__callbacks'
activesupport (4.0.0) lib/active_support/callbacks.rb:80:in `run_callbacks'
actionpack (4.0.0) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (4.0.0) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
activesupport (4.0.0) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.0.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.0.0) lib/active_support/notifications.rb:159:in `instrument'
actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.0.0) lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
activerecord (4.0.0) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.0.0) lib/abstract_controller/base.rb:136:in `process'
actionpack (4.0.0) lib/abstract_controller/rendering.rb:44:in `process'
actionpack (4.0.0) lib/action_controller/metal.rb:195:in `dispatch'
actionpack (4.0.0) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.0.0) lib/action_controller/metal.rb:231:in `block in action'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:80:in `call'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:48:in `call'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:71:in `block in call'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `each'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `call'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:655: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 `catch'
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.0) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.0.0) 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.0) lib/action_dispatch/middleware/cookies.rb:486:in `call'
activerecord (4.0.0) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
activerecord (4.0.0) lib/active_record/migration.rb:369:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.0.0) lib/active_support/callbacks.rb:373:in `_run__307601885218201832__call__callbacks'
activesupport (4.0.0) lib/active_support/callbacks.rb:80:in `run_callbacks'
actionpack (4.0.0) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/reloader.rb:64:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tagged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `call'
actionpack (4.0.0) 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.0) 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.0) lib/action_dispatch/middleware/static.rb:64:in `call'
railties (4.0.0) lib/rails/engine.rb:511:in `call'
railties (4.0.0) lib/rails/application.rb:97:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
thin (1.6.0) lib/thin/connection.rb:82:in `block in pre_process'
thin (1.6.0) lib/thin/connection.rb:80:in `catch'
thin (1.6.0) lib/thin/connection.rb:80:in `pre_process'
thin (1.6.0) lib/thin/connection.rb:55:in `process'
thin (1.6.0) lib/thin/connection.rb:41:in `receive_data'
eventmachine (1.0.3) lib/eventmachine.rb:187:in `run_machine'
eventmachine (1.0.3) lib/eventmachine.rb:187:in `run'
thin (1.6.0) lib/thin/backends/base.rb:73:in `start'
thin (1.6.0) lib/thin/server.rb:162:in `start'
rack (1.5.2) lib/rack/handler/thin.rb:16:in `run'
rack (1.5.2) lib/rack/server.rb:264:in `start'
railties (4.0.0) lib/rails/commands/server.rb:84:in `start'
railties (4.0.0) lib/rails/commands.rb:78:in `block in <top (required)>'
railties (4.0.0) lib/rails/commands.rb:73:in `tap'
railties (4.0.0) lib/rails/commands.rb:73:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
My App/Admin/Team.rb file
ActiveAdmin.register Team do
def permitted_params
params.permit!
end
end
I am receiving an error in production only that says:
TypeError (no implicit conversion of Symbol into String):
app/controllers/products_controller.rb:15:in `create'
Here is the relevant code from the products_controller.rb file (note the line in question is line 2 below)
def create
#product = #category.products.build(product_params)
if #product.save
flash[:success] = "Product successfully created"
redirect_to [#category, #product]
else
flash[:alert] = "Product not created"
render 'new'
end
end
private
def product_params
params.require(:product).permit(:name, :description, :url, :category_id, :picture, :price, :social_image)
end
This code currently works fine in development and test environments and was previously working in production (will explain changes since last working production version below). I have used a diff tool to confirm that the Gemfile.lock is identical between local and production machines to eliminate that aspect also.
Note: I previously had file uploads working using the Paperclip gem as seen in the :picture param, however I recently included a second file upload for this model (:social_image) and also switched the upload method to Amazon S3 via the aws-sdk gem rather than just to the production server. Also, I have confirmed that all relevant settings between development.rb and production.rb are correct.
The params for the request can be found below:
{"utf8"=>"✓",
"authenticity_token"=>"yJJ1HwLZz9oDmsfUfN87DATCe+HC9IBhYVBddRvm4=",
"product"=>{"name"=>"Heineken Style USB Flash Drive",
"description"=>"Sample Description.",
"url"=>"http://www.amazon.com/",
"category_id"=>"1",
"price"=>"7.99",
"picture"=>#<ActionDispatch::Http::UploadedFile:0x00000004986260 #tempfile=#<Tempfile:/tmp/RackMultipart20131013-3068-fyjvy2>,
#original_filename="heineken-usb-drive-stock.jpg",
#content_type="image/jpeg",
#headers="Content-Disposition: form-data; name=\"product[picture]\"; filename=\"heineken-usb-drive-stock.jpg\"\r\nContent-Type: image/jpeg\r\n">,
"social_image"=>#<ActionDispatch::Http::UploadedFile:0x000000049861c0 #tempfile=#<Tempfile:/tmp/RackMultipart20131013-3068-1glzf9p>,
#original_filename="heineken-usb-drive.png",
#content_type="image/png",
#headers="Content-Disposition: form-data; name=\"product[social_image]\"; filename=\"heineken-usb-drive.png\"\r\nContent-Type: image/png\r\n">},
"commit"=>"Create Product",
"category_id"=>"geeky"}
I have included a stack track below as well for everyones reference:
paperclip (3.5.1) lib/paperclip/storage/s3.rb:141:in `gsub'
paperclip (3.5.1) lib/paperclip/storage/s3.rb:141:in `block in extended'
paperclip (3.5.1) lib/paperclip/storage/s3.rb:117:in `instance_eval'
paperclip (3.5.1) lib/paperclip/storage/s3.rb:117:in `extended'
paperclip (3.5.1) lib/paperclip/attachment.rb:390:in `extend'
paperclip (3.5.1) lib/paperclip/attachment.rb:390:in `initialize_storage'
paperclip (3.5.1) lib/paperclip/attachment.rb:85:in `initialize'
paperclip (3.5.1) lib/paperclip/has_attached_file.rb:46:in `new'
paperclip (3.5.1) lib/paperclip/has_attached_file.rb:46:in `block in define_instance_getter'
paperclip (3.5.1) lib/paperclip/has_attached_file.rb:65:in `block in define_setter'
activerecord (4.0.0) lib/active_record/attribute_assignment.rb:42:in `public_send'
activerecord (4.0.0) lib/active_record/attribute_assignment.rb:42:in `_assign_attribute'
activerecord (4.0.0) lib/active_record/attribute_assignment.rb:29:in `block in assign_attributes'
activerecord (4.0.0) lib/active_record/attribute_assignment.rb:23:in `each'
activerecord (4.0.0) lib/active_record/attribute_assignment.rb:23:in `assign_attributes'
activerecord (4.0.0) lib/active_record/core.rb:192:in `initialize'
activerecord (4.0.0) lib/active_record/inheritance.rb:27:in `new'
activerecord (4.0.0) lib/active_record/inheritance.rb:27:in `new'
activerecord (4.0.0) lib/active_record/reflection.rb:189:in `build_association'
activerecord (4.0.0) lib/active_record/associations/association.rb:242:in `build_record'
activerecord (4.0.0) lib/active_record/associations/collection_association.rb:114:in `build'
activerecord (4.0.0) lib/active_record/associations/collection_proxy.rb:229:in `build'
app/controllers/products_controller.rb:16:in `create'
actionpack (4.0.0) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (4.0.0) lib/abstract_controller/base.rb:189:in `process_action'
actionpack (4.0.0) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (4.0.0) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
activesupport (4.0.0) lib/active_support/callbacks.rb:443:in `_run__3726568038748606890__process_action__callbacks'
activesupport (4.0.0) lib/active_support/callbacks.rb:80:in `run_callbacks'
actionpack (4.0.0) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (4.0.0) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
activesupport (4.0.0) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.0.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.0.0) lib/active_support/notifications.rb:159:in `instrument'
actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.0.0) lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
activerecord (4.0.0) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.0.0) lib/abstract_controller/base.rb:136:in `process'
actionpack (4.0.0) lib/abstract_controller/rendering.rb:44:in `process'
actionpack (4.0.0) lib/action_controller/metal.rb:195:in `dispatch'
actionpack (4.0.0) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.0.0) lib/action_controller/metal.rb:231:in `block in action'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:80:in `call'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:48:in `call'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:71:in `block in call'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `each'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `call'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:655: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 `catch'
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:35:in `call'
rack (1.5.2) lib/rack/head.rb:11:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.0.0) 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.0) lib/action_dispatch/middleware/cookies.rb:486:in `call'
activerecord (4.0.0) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.0.0) lib/active_support/callbacks.rb:373:in `_run__1565355437262191815__call__callbacks'
activesupport (4.0.0) lib/active_support/callbacks.rb:80:in `run_callbacks'
actionpack (4.0.0) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tagged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `call'
actionpack (4.0.0) 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.0) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
railties (4.0.0) lib/rails/engine.rb:511:in `call'
railties (4.0.0) lib/rails/application.rb:97:in `call'
/home/application/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.16/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in `process_request'
/home/application/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.16/lib/phusion_passenger/request_handler/thread_handler.rb:140:in `accept_and_process_next_request'
/home/application/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.16/lib/phusion_passenger/request_handler/thread_handler.rb:108:in `main_loop'
/home/application/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.16/lib/phusion_passenger/request_handler.rb:441:in `block (3 levels) in start_threads'
Finally the full codebase is available at: https://github.com/mhoad/there-goes-my-paycheck/tree/deployment should anyone want to check out any other files.
Any help would this would be majorly appreciated! Thanks in advance
In your production.rb file, paperclip is configured with :url => :s3_domain_url, while in dev it's :url => ':s3_domain_url' (note the quotation marks). Seems like you could move the whole config.paperclip_defaults to application.rb as well, so you're guaranteed the same settings even when something changes.
Thanks for posting a link to the repo, by the way - it's much easier to spot these things when you can see the whole app.