10 days ago
I'm not able to get solid_queue to work with my rails app on railway. I have all the necessary migration files ready (including a db/queue_schema.rb file), but when I run the default deploy command from this guide: https://docs.railway.com/guides/rails#deploy-from-a-github-repo I notice that there's no migration for solid_queue.
And sure enough, when I try to use a function that requires solid_queue I get this error:
[032c6bdc-f113-45da-a497-435f8b5150b7] activerecord (8.0.2) lib/active_record/connection_adapters/abstract/database_statements.rb:591:in 'ActiveRecord::ConnectionAdapters::DatabaseStatements#internal_execute' [032c6bdc-f113-45da-a497-435f8b5150b7] [ActiveJob] Failed enqueuing ActionMailbox::RoutingJob to SolidQueue(default): SolidQueue::Job::EnqueueError (ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: relation "solid_queue_jobs" does not exist
1 Replies
9 days ago
from the error, i think solid_queue_jobs
table doesn't exist and Railway isn’t loading db/queue_schema.rb
.
Just update your railway deploy command to: bundle exec rails db:prepare && bundle exec rails assets:precompile
then make sure that db/queue_schema.rb
is commited to Git and solid_queue
is in your Gemfile.