Skip to content

How do you create an environment? #16

@ghost

Description

The README says

env = CommonJS::Environment.new(:path => '/path/to/lib/dir')

But it doesn't explain what the path to lib directory is supposed to be a path to? What library? I've tried using the current directory but get an error.

1.9.3-p484 :024 >   env = CommonJS::Environment.new(:path => './')
TypeError: can't convert nil into String
    from /Users/mgwelch/.rvm/gems/ruby-1.9.3-p484/gems/commonjs-0.2.7/lib/commonjs/environment.rb:9:in `initialize'
    from /Users/mgwelch/.rvm/gems/ruby-1.9.3-p484/gems/commonjs-0.2.7/lib/commonjs/environment.rb:9:in `Pathname'
    from /Users/mgwelch/.rvm/gems/ruby-1.9.3-p484/gems/commonjs-0.2.7/lib/commonjs/environment.rb:9:in `block in initialize'
    from /Users/mgwelch/.rvm/gems/ruby-1.9.3-p484/gems/commonjs-0.2.7/lib/commonjs/environment.rb:9:in `map'
    from /Users/mgwelch/.rvm/gems/ruby-1.9.3-p484/gems/commonjs-0.2.7/lib/commonjs/environment.rb:9:in `initialize'
    from (irb):24:in `new'
    from (irb):24
    from /Users/mgwelch/.rvm/rubies/ruby-1.9.3-p484/bin/irb:12:in `<main>'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions