5 months 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
4 Replies
5 months 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.
2 months ago
I have all tables but somehow the jobs do not run 
Can someone from @support help me out?
2 months ago
if you say you have the tables, but the app says you don't have the tables it might be that you are pointing to the wrong db/schema?
2 months ago
I solved this by creating 2 different postgres services. You use one for your regular db, and the other for solid queue, and connect these accordingly to your rails and jobs servers.
Attachments
Status changed to Solved brody • about 2 months ago