documentcloud / cloud-crowd

Parallel Processing for the Rest of Us

Home Page:https://github.com/documentcloud/cloud-crowd/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

private method `load' called for YAML:Module (NoMethodError)

jacobwgillespie opened this issue · comments

I am using ruby 1.9.2 and the YAML.load method fails if not preceded by require 'yaml'

See https://gist.github.com/1247010 for an example

jacobwg:.crowd jacobwg$ crowd load_schema
/Users/jacobwg/.rvm/gems/ruby-1.9.2-p290/gems/cloud-crowd-0.6.2/lib/cloud-crowd.rb:99:in `configure': private method `load' called for YAML:Module (NoMethodError)
    from /Users/jacobwg/.rvm/gems/ruby-1.9.2-p290/gems/cloud-crowd-0.6.2/lib/cloud_crowd/command_line.rb:217:in `load_code'
    from /Users/jacobwg/.rvm/gems/ruby-1.9.2-p290/gems/cloud-crowd-0.6.2/lib/cloud_crowd/command_line.rb:135:in `run_load_schema'
    from /Users/jacobwg/.rvm/gems/ruby-1.9.2-p290/gems/cloud-crowd-0.6.2/lib/cloud_crowd/command_line.rb:44:in `initialize'
    from /Users/jacobwg/.rvm/gems/ruby-1.9.2-p290/gems/cloud-crowd-0.6.2/bin/crowd:5:in `new'
    from /Users/jacobwg/.rvm/gems/ruby-1.9.2-p290/gems/cloud-crowd-0.6.2/bin/crowd:5:in `<top (required)>'
    from /Users/jacobwg/.rvm/gems/ruby-1.9.2-p290/bin/crowd:19:in `load'
    from /Users/jacobwg/.rvm/gems/ruby-1.9.2-p290/bin/crowd:19:in `<main>'

I see that there's an autoload call in there - could it be that since YAML is already defined in 1.9 that it is not requiring yaml?

I'm seeing the same issue using Ruby 1.8.7.

+1 (1.8.7)
Any workaround yet?

Haven't tried it myself, but you might try explicitly requiring yaml in your code before you require cloud-crowd.

... or just requre 'yaml' in cloud-crowd
https://github.com/documentcloud/cloud-crowd/pull/34/files
works for me. Shouldn't affect anything badly.