Skip to main content
Ask A Question
Notifications
You’re not receiving notifications from this thread.
Subscribe

Phusion Passenger error on Hatchbox

Rails • Asked by Houssein abil

Hello,

I have just deployed my app successfully on Hatchbox. Its works perfectly but when I try to access a page via activeadmin, I get this error and I definitely don't understand it nor what do. Some help please

2d733fc7-8ca0-4625-874b-3929985cd478] activesupport (6.0.2.1) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
[2d733fc7-8ca0-4625-874b-3929985cd478] actionpack (6.0.2.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
[2d733fc7-8ca0-4625-874b-3929985cd478] rack (2.1.2) lib/rack/sendfile.rb:113:in `call'
[2d733fc7-8ca0-4625-874b-3929985cd478] actionpack (6.0.2.1) lib/action_dispatch/middleware/host_authorization.rb:77:in `call'
[2d733fc7-8ca0-4625-874b-3929985cd478] railties (6.0.2.1) lib/rails/engine.rb:526:in `call'
[2d733fc7-8ca0-4625-874b-3929985cd478] /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:97:in `process_request'
[2d733fc7-8ca0-4625-874b-3929985cd478] /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:149:in `accept_and_process_next_request'
[2d733fc7-8ca0-4625-874b-3929985cd478] /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop'
[2d733fc7-8ca0-4625-874b-3929985cd478] /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:415:in `block (3 levels) in start_threads'
[2d733fc7-8ca0-4625-874b-3929985cd478] /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'

Is there more to the stacktrace? This doesn't look like a complete one.


This what I'm getting now on the whole app

And this what is in the log

deploy@crimson-cloud-3915:~$ tail ~/centcode/current/log/production.log
[fecd54fa-e891-4c21-9ce3-4f930fc9632b] /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop'
[fecd54fa-e891-4c21-9ce3-4f930fc9632b] /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:415:in `block (3 levels) in start_threads'
[fecd54fa-e891-4c21-9ce3-4f930fc9632b] /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'
I, [2020-02-11T16:11:54.749216 #21670]  INFO -- : [64574b3e-1a14-42f3-8801-dfe9903c2a58] Started GET "/" for 154.73.65.17 at 2020-02-11 16:11:54 +0000
I, [2020-02-11T16:11:54.753129 #21670]  INFO -- : [64574b3e-1a14-42f3-8801-dfe9903c2a58] Processing by ProjectController#index as HTML
I, [2020-02-11T16:11:54.762839 #21670]  INFO -- : [64574b3e-1a14-42f3-8801-dfe9903c2a58] Completed 401 Unauthorized in 9ms (Allocations: 387)
D, [2020-02-11T16:33:52.684583 #22642] DEBUG -- :    (0.4ms)  SELECT pg_try_advisory_lock(4761540374926607370)
D, [2020-02-11T16:33:52.700000 #22642] DEBUG -- :    (1.0ms)  SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
D, [2020-02-11T16:33:52.710371 #22642] DEBUG -- :   ActiveRecord::InternalMetadata Load (0.5ms)  SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2  [["key", "environment"], ["LIMIT", 1]]
D, [2020-02-11T16:33:52.716745 #22642] DEBUG -- :    (0.8ms)  SELECT pg_advisory_unlock(4761540374926607370)
deploy@crimson-cloud-3915:~$

You can use -n 300 to with tail to display 300 lines of logs. By default it only shows a small handful.


I use this code to go through the error and I finally find those lines

ActionView::Template::Error (PG::UndefinedTable: ERROR:  relation "active_storage_attachments" does not exist

and

Missing service adapter for "S3" (RuntimeError)

Hello I finally find a solution. The problem was due to active storage. In production active storage was not enabled. So I delete all the table fo active storage (blobs and attachements) then I reinstall the active_storage, run the migration and now everyhting works


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 30,005+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.