Open jcoyne opened 1 year ago
Standalone producer does not seem to load rails config by default. I will look into fixing that. Meanwhile you can load it manually in a rails initializer, something like this
# file config/initializers/racecar.rb
Racecar.config.load_file("config/racecar.yml", ENV["RAILS_ENV"])
Alternatively you could configure racecar directly in the initializer
Racecar.configure do |config|
config.brokers = 'localhost:9092'
end
If I have a Rails controller that does:
it will not get the config loaded from
config/racecar.rb
orconfig/racecar.yml
it is only loaded in the CLI (for the consumer): https://github.com/zendesk/racecar/blob/0a7d9592749c3b5479ae340a8633f1491c654a6d/lib/racecar/cli.rb#L27-L31