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

console doesn't load config file when not using default #256

Open
flop opened this issue Aug 19, 2013 · 1 comment
Open

console doesn't load config file when not using default #256

flop opened this issue Aug 19, 2013 · 1 comment

Comments

@flop
Copy link

flop commented Aug 19, 2013

When using another config file than the default (via the --config for example), the file is not loaded in the console.

@kornypoet
Copy link

@flop I've run in to this a few times myself. My suggestions are to first try passing the full path to the --config option rather than a relative one:

ruby my_server.rb -sv --config=/full/path_to/config/my_server_config.rb

If that fails to load, try explicitly overriding the :config in the options hash. In your API code:

class MyServer < Goliath::API

  # You are given this method to override and make changes to,
  # or add additional server options
  def options_parser(opts, options)
    options[:config]  = '/full/path_to/config/my_server_config.rb'
  end
end

That should get you up and running with a customized config.

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

No branches or pull requests

2 participants