require seems to not work with paths #230

Open
zenspider opened this Issue Jan 26, 2013 · 5 comments

Comments

Projects
None yet
2 participants
Contributor

zenspider commented Jan 26, 2013


% ruby -Ix -e 'require "Inline_Foo__Bar_55273c2d28e631d71c0c1e625a2a03f4"'
Warning: loadCLibrary dlopen failed, name: /Users/ryan/Work/p4/zss/src/RubyInline/dev/x/Inline_Foo__Bar_55273c2d28e631d71c0c1e625a2a03f4.bundle
   dlerror: dlopen(/Users/ryan/Work/p4/zss/src/RubyInline/dev/x/Inline_Foo__Bar_55273c2d28e631d71c0c1e625a2a03f4.bundle, 265): Symbol not found: _rb_cObject
  Referenced from: /Users/ryan/Work/p4/zss/src/RubyInline/dev/x/Inline_Foo__Bar_55273c2d28e631d71c0c1e625a2a03f4.bundle
  Expected in: flat namespace
 in /Users/ryan/Work/p4/zss/src/RubyInline/dev/x/Inline_Foo__Bar_55273c2d28e631d71c0c1e625a2a03f4.bundle
ERROR 2702 , a RubyLoadError occurred (error 2702), dlopen(/Users/ryan/Work/p4/zss/src/RubyInline/dev/x/Inline_Foo__Bar_55273c2d28e631d71c0c1e625a2a03f4.bundle, 265): Symbol not found: _rb_cObject
  Referenced from: /Users/ryan/Work/p4/zss/src/RubyInline/dev/x/Inline_Foo__Bar_55273c2d28e631d71c0c1e625a2a03f4.bundle
  Expected in: flat namespace
 in /Users/ryan/Work/p4/zss/src/RubyInline/dev/x/Inline_Foo__Bar_55273c2d28e631d71c0c1e625a2a03f4.bundle (LoadError)
topaz 1> exit

Ignore the fact that it isn't loading the file. I'll file that as a separate ticket. The point is that it is trying to load it. Compare to:

10095 % ruby -e 'require "./x/Inline_Foo__Bar_55273c2d28e631d71c0c1e625a2a03f4.bundle"'
ERROR 2702 , a RubyLoadError occurred (error 2702), no such file to load -- ./x/Inline_Foo__Bar_55273c2d28e631d71c0c1e625a2a03f4.bundle (LoadError)
topaz 1> exit

I tried with various extensions and without. Nothing seems to work if there is a "/" in the string.

Owner

timfel commented Jan 28, 2013

I think the relative path is what doesn't work. If something in $LOAD_PATH concatenated with your require argument matches it should work. Are you trying to require relative to your working directory?

Owner

timfel commented Jan 29, 2013

I just tried maglev-ruby -e "require ./x/test and it works fine if test is a ruby file, but not for C extensions. I'll look into this.

Contributor

zenspider commented Jan 29, 2013

On Jan 28, 2013, at 13:13 , Tim Felgentreff notifications@github.com wrote:

I think the relative path is what doesn't work. If something in $LOAD_PATH concatenated with your require argument matches it should work. Are you trying to require relative to your working directory?

RubyInline was doing full paths... but both full and relative bork. Any "/" at all looks to bork it.

Contributor

zenspider commented Feb 13, 2013

This is blocking anything depending on RubyInline: flay-persistence (which is DYING for maglev), png, zenoptimize, event_hook, stable_hash, faster_queue, image_science, osx_keychain, time_as_f, un, zenprofiler... prolly more.

Contributor

zenspider commented Jul 16, 2014

ping

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