Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


configatron-2.8.1/lib/configatron/store.rb:308:in `block in parse_options': undefined method `configure_from_hash' #16

sunteya opened this Issue · 3 comments

3 participants


The following code runs error :

configatron.import = "base/path" = {
  :import => {
    :path => { File.join(configatron.import, "bar") }

Output :

/Users/sunteya/.rvm/gems/ruby-1.9.2-p180/gems/configatron-2.8.1/lib/configatron/store.rb:308:in `block in parse_options': undefined method `configure_from_hash' for "base/path":String (NoMethodError)
    from /Users/sunteya/.rvm/gems/ruby-1.9.2-p180/gems/configatron-2.8.1/lib/configatron/store.rb:303:in `each'
    from /Users/sunteya/.rvm/gems/ruby-1.9.2-p180/gems/configatron-2.8.1/lib/configatron/store.rb:303:in `parse_options'
    from /Users/sunteya/.rvm/gems/ruby-1.9.2-p180/gems/configatron-2.8.1/lib/configatron/store.rb:148:in `method_missing'
    from /Users/sunteya/.rvm/gems/ruby-1.9.2-p180/gems/configatron-2.8.1/lib/configatron/configatron.rb:15:in `method_missing'
    from /Users/sunteya/Workspaces/bstar/pukka/home_news_client/config/application.extra.rb:7:in `block (3 levels) in <class:Application>'
    from /Users/sunteya/Workspaces/bstar/pukka/home_news_client/config/application.rb:50:in `instance_eval'
    from /Users/sunteya/Workspaces/bstar/pukka/home_news_client/config/application.rb:50:in `block (3 levels) in <class:Application>'

Looks like the "configure_from_hash" method only run on the configatron object.


Also getting this same bug with configatron.configure_from_yaml


I'll look into this. Just an FYI with the next configatron release I'm going to deprecate configure_from_yaml. It's preferred that you configure from Ruby not from YAML.

sunteya you should probably write your configuration like this: = { File.join(configatron.import, "bar") }

That's definitely a lot less typing. :)

@markbates markbates closed this

this should be fixed in 2.8.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.