Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add explicit development instructions to the README. #390

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

evdevdev
Copy link

@evdevdev evdevdev commented Oct 18, 2024

I'm playing around with a Rails 8 app, and I had a small bit of confusion in getting Solid Queue running in development. Therefore, I wrote out instructions that I think I would have found helpful. Maybe other folks will find these helpful as well?

I know that #238 mentioned a coming revamp to how Solid Queue works in development. If this clashes with that, I'd be happy to update it to reflect any other changes.

@Juksefantomet
Copy link

I was unable to get solid queue to work in development until i saw this PR. the Puma.rb edit is vital to get any output regarding development setup. The base note pointing to a plugin mentions nothing about it being required for a native puma+sqlite setup to even catch solid gems.

@rosa
Copy link
Member

rosa commented Nov 7, 2024

Thanks @evdevdev, sorry for the delay looking into this. I'm still a bit undecided about Solid Queue in development, which is why I haven't merged or requested changes yet.

@Juksefantomet:

The base note pointing to a plugin mentions nothing about it being required for a native puma+sqlite setup to even catch solid gems.

🤔 What do you mean by "required"? Using the Puma plugin is not mandatory, you can run everything in development without it 😕

@Juksefantomet
Copy link

Juksefantomet commented Nov 7, 2024

@rosa

Prior to adding the plugin entry to puma.rb solid queue config and databases was not created.

Added entries to queue.yml, recurring,yml, database.yml and environment/development.rb did not trigger any results when invoking rails db:prepare or rails db:migrate.

The second i added the plugin entry to puma.rb solid_queue was enabled and database for queue,cable and cache was created for development.

Ubuntu 24.04, rails 8.0.0.rc2, ruby 3.3.3 through rbenv.

Fresh project initialized today as we were prepping a PoC for a new concept at work.

@Juksefantomet
Copy link

@rosa

I stand corrected.

The culprit for database generation was not the plugin, but the solid queue is not being used until i add the plugin entry.

The reason for databases not being created was database.yml:

failed config:

development:
  <<: *default
  database: storage/development.sqlite3
  cache:
    <<: *default
    database: storage/development_cache.sqlite3
    migrations_paths: db/cache_migrate
  queue:
    <<: *default
    database: storage/development_queue.sqlite3
    migrations_paths: db/queue_migrate
  cable:
    <<: *default
    database: storage/development_cable.sqlite3
    migrations_paths: db/cable_migrate

As i simply added the required entries to the existing setup for development i did not add "primary:"

resulting working entry:

development:
  primary:
    <<: *default
    database: storage/development.sqlite3
  cache:
    <<: *default
    database: storage/development_cache.sqlite3
    migrations_paths: db/cache_migrate
  queue:
    <<: *default
    database: storage/development_queue.sqlite3
    migrations_paths: db/queue_migrate
  cable:
    <<: *default
    database: storage/development_cable.sqlite3
    migrations_paths: db/cable_migrate

but my rails does not provide any console data regarding solid queue and does not trigger internal scheduling until i add the plugin :solid_queue entry to puma.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants