Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Bundle.require (1.1 RC) not allowing dashes in requires #1531

Closed
jaygen opened this Issue Nov 13, 2011 · 0 comments

Comments

Projects
None yet
2 participants

jaygen commented Nov 13, 2011

gem 'em-synchrony', :require => ['em-synchrony',
                                   'em-synchrony/em-http',
                                   'em-synchrony/activerecord'],
      :git => 'git://github.com/igrigorik/em-synchrony.git'

Is causing Bundler to report

LoadError: no such file to load -- em/synchrony
    from /Users/xxx/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.1.rc/lib/bundler/runtime.rb:76:in `require'
    from /Users/xxx/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.1.rc/lib/bundler/runtime.rb:76:in `rescue in block in require'
    from /Users/xxx/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.1.rc/lib/bundler/runtime.rb:62:in `block in require'
    from /Users/xxx/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.1.rc/lib/bundler/runtime.rb:55:in `each'
    from /Users/xxx/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.1.rc/lib/bundler/runtime.rb:55:in `require'
    from /Users/xxx/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.1.rc/lib/Bundler.rb:128:in `require'
    from (irb):6
    from /Users/xxx/.rvm/rubies/ruby-1.9.2-p290/bin/irb:16:in `'

I modified runtime.rb like so to avoid this error, but I'm not entirely sure how else to get around this new 'feature' properly.

 73           #if dep.name.include?('-')
 74           #  begin
 75           #    namespaced_file = dep.name.gsub('-', '/')
 76           #    Kernel.require namespaced_file
 77           #  rescue LoadError
 78           #    REGEXPS.find { |r| r =~ e.message }
 79           #    raise if dep.autorequire || $1.gsub('-', '/') != namespaced_file
 80           #  end
 81           #else
 82             raise if dep.autorequire || $1 != required_file
 83           #end

@ghost ghost assigned indirect Nov 21, 2011

@indirect indirect closed this in 9636695 Nov 30, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment