You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following terminal session tells the story.
(Sorry about the long paths!)
A little Ruby program to do a require relative.
$ cat /Users/bobjalex/sbn/sideband/metal/x.rb
!/usr/bin/env ruby
p "loading"
require_relative "metal_lib"
p "done"
A symlink to the above program in /usr/local/bin (it's executable).
$ ls -l /usr/local/bin/x
lrwxr-xr-x 1 root admin 39 Jun 3 17:10 /usr/local/bin/x -> /Users/bobjalex/sbn/sideband/metal/x.rb
Our current directory. The target "metal_lib" is in it.
$ pwd
/Users/bobjalex/sbn/sideband/metal
$ ls metal_lib.rb
metal_lib.rb
/usr/local/bin is in the PATH (long path edited).
$ echo $PATH
...:/usr/local/bin
Run /usr/local/bin/x -- runs fine under Ruby 1.9.3.
$ rvm use 1.9
$ ruby -v
ruby 1.9.3p547 (2014-05-14 revision 45962) [x86_64-darwin13.2.0]
$ x
"loading"
"done"
Run /usr/local/bin/x using jruby. -- fails.
$ rvm jruby
$ ruby -v
jruby 1.7.12 (1.9.3p392) 2014-04-15 643e292 on Java HotSpot(TM) 64-Bit Server VM 1.8.0_05-b13 +indy [darwin-x86_64]
$ x
"loading"
LoadError: no such file to load -- /usr/local/bin/metal_lib
require at org/jruby/RubyKernel.java:1065
require at /Users/bobjalex/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
require_relative at file:/Users/bobjalex/.rvm/rubies/jruby-1.7.12/lib/jruby.jar!/jruby/kernel19/kernel.rb:21
(root) at /usr/local/bin/x:3
Run the little program using jruby without the link -- works.
$ ./x.rb
"loading"
"done"
The text was updated successfully, but these errors were encountered:
The following terminal session tells the story.
(Sorry about the long paths!)
A little Ruby program to do a require relative.
$ cat /Users/bobjalex/sbn/sideband/metal/x.rb
!/usr/bin/env ruby
p "loading"
require_relative "metal_lib"
p "done"
A symlink to the above program in /usr/local/bin (it's executable).
$ ls -l /usr/local/bin/x
lrwxr-xr-x 1 root admin 39 Jun 3 17:10 /usr/local/bin/x -> /Users/bobjalex/sbn/sideband/metal/x.rb
Our current directory. The target "metal_lib" is in it.
$ pwd
/Users/bobjalex/sbn/sideband/metal
$ ls metal_lib.rb
metal_lib.rb
/usr/local/bin is in the PATH (long path edited).
$ echo $PATH
...:/usr/local/bin
Run /usr/local/bin/x -- runs fine under Ruby 1.9.3.
$ rvm use 1.9
$ ruby -v
ruby 1.9.3p547 (2014-05-14 revision 45962) [x86_64-darwin13.2.0]
$ x
"loading"
"done"
Run /usr/local/bin/x using jruby. -- fails.
$ rvm jruby
$ ruby -v
jruby 1.7.12 (1.9.3p392) 2014-04-15 643e292 on Java HotSpot(TM) 64-Bit Server VM 1.8.0_05-b13 +indy [darwin-x86_64]
$ x
"loading"
LoadError: no such file to load -- /usr/local/bin/metal_lib
require at org/jruby/RubyKernel.java:1065
require at /Users/bobjalex/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
require_relative at file:/Users/bobjalex/.rvm/rubies/jruby-1.7.12/lib/jruby.jar!/jruby/kernel19/kernel.rb:21
(root) at /usr/local/bin/x:3
Run the little program using jruby without the link -- works.
$ ./x.rb
"loading"
"done"
The text was updated successfully, but these errors were encountered: