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

HDM does not initialize database #275

Closed
tuxmea opened this issue Jan 24, 2024 · 2 comments
Closed

HDM does not initialize database #275

tuxmea opened this issue Jan 24, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@tuxmea
Copy link
Member

tuxmea commented Jan 24, 2024

When running a Manual Installation (https://github.com/betadots/hdm/blob/main/MANUAL_INSTALL.md) the task to set up the database fails:

bundle exec rails db:setup
/opt/hdm/vendor/bundle/ruby/3.2.0/gems/io-event-1.3.3/lib/io/event/support.rb:24: warning: IO::Buffer is experimental and both the Ruby and C interface may change in the future!
bin/rails aborted!
NoMethodError: undefined method `[]' for nil:NilClass (NoMethodError)

      if Rails.configuration.hdm['read_only']
                                ^^^^^^^^^^^^^
/opt/hdm/config/routes.rb:32:in `block (3 levels) in <top (required)>'

HDM config:

cat config/hdm.yml
---
production:
  read_only: true
  allow_encryption: false
  puppet_db:
    server: http://localhost:8080
  hiera_config_file: "hiera.yaml"
  config_dir: /etc/puppetlabs/code
@tuxmea tuxmea added the bug Something isn't working label Jan 24, 2024
@tuxmea
Copy link
Member Author

tuxmea commented Jan 24, 2024

Must set development.

@tuxmea tuxmea closed this as completed Jan 24, 2024
@oneiros
Copy link
Collaborator

oneiros commented Jan 24, 2024

Looks like hdm.yml only has configuration for the production environment. When running bundle exec rails db:setup it will try to set up the development (and test) database(s).

Either add a development-config to hdm.yml or run RAILS_ENV=production bundle exec rails db:setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants