Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rc1 fails on require 'psych' if .gemspec with require_relative in current directory #3074

Closed
SpencerBrown opened this issue Jun 22, 2015 · 2 comments

Comments

@SpencerBrown
Copy link

Quite vanilla download/untar tryout for first time JRuby user. Hit this strange issue. Seems to happen only when doing a require 'psych' and only when there is a .gemspec in the current directory that has a require_relative in it. If any of these 3 conditions change I do not see the issue.

Spencers-iMac:jruby spencer$ which jruby
/Users/spencer/jruby/jruby-9.0.0.0.rc1/bin/jruby
Spencers-iMac:jruby spencer$ jruby --version
jruby 9.0.0.0.rc1 (2.2.2) 2015-06-10 a0bf3b3 Java HotSpot(TM) 64-Bit Server VM 25.45-b02 on 1.8.0_45-b14 +jit [darwin-x86_64]
Spencers-iMac:jruby spencer$ pwd
/Users/spencer/jruby
Spencers-iMac:jruby spencer$ ls
jruby-9.0.0.0.rc1   sourcetarball
Spencers-iMac:jruby spencer$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Applications/Server.app/Contents/ServerRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin:/Users/spencer/go/bin:/Users/spencer/jruby/jruby-9.0.0.0.rc1/bin
Spencers-iMac:jruby spencer$ jruby -S gem environment
RubyGems Environment:
  - RUBYGEMS VERSION: 2.4.8
  - RUBY VERSION: 2.2.2 (2015-06-10 patchlevel 0) [java]
  - INSTALLATION DIRECTORY: /Users/spencer/jruby/jruby-9.0.0.0.rc1/lib/ruby/gems/shared
  - RUBY EXECUTABLE: /Users/spencer/jruby/jruby-9.0.0.0.rc1/bin/jruby
  - EXECUTABLE DIRECTORY: /Users/spencer/jruby/jruby-9.0.0.0.rc1/bin
  - SPEC CACHE DIRECTORY: /Users/spencer/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /Users/spencer/jruby/jruby-9.0.0.0.rc1/etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-java-1.8
  - GEM PATHS:
     - /Users/spencer/jruby/jruby-9.0.0.0.rc1/lib/ruby/gems/shared
     - /Users/spencer/.gem/jruby/2.2.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
     - "install" => "--no-rdoc --no-ri --env-shebang"
     - "update" => "--no-rdoc --no-ri --env-shebang"
     - :sources => ["https://rubygems.org/", "http://rubygems.org/"]
  - REMOTE SOURCES:
     - https://rubygems.org/
     - http://rubygems.org/
  - SHELL PATH:
     - /usr/local/bin
     - /usr/bin
     - /bin
     - /usr/sbin
     - /sbin
     - /opt/X11/bin
     - /Applications/Server.app/Contents/ServerRoot/usr/bin
     - /Applications/Server.app/Contents/ServerRoot/usr/sbin
     - /Users/spencer/go/bin
     - /Users/spencer/jruby/jruby-9.0.0.0.rc1/bin
Spencers-iMac:jruby spencer$ jruby -S gem list

*** LOCAL GEMS ***

aws-sdk (2.1.1)
aws-sdk-core (2.1.1)
aws-sdk-resources (2.1.1)
bundler (1.10.4)
inifile (3.0.0)
jar-dependencies (0.1.14)
jmespath (1.0.2)
jruby-openssl (0.9.7 java)
json (1.8.3 java, 1.8.0 java)
minitest (5.7.0, 5.4.1)
multi_json (1.11.1)
power_assert (0.2.3)
psych (2.0.14.pre1 java)
rake (10.4.2, 10.1.0)
rdoc (4.2.0, 4.1.0)
ruby-maven (3.3.2)
ruby-maven-libs (3.3.3)
test-unit (3.1.2, 3.0.3)
Spencers-iMac:jruby spencer$ jruby -e "puts require 'psych'"
true
Spencers-iMac:jruby spencer$ echo "require_relative 'something'" > x.gemspec
Spencers-iMac:jruby spencer$ jruby -e "puts require 'inifile'"
true
Spencers-iMac:jruby spencer$ jruby -e "puts require 'psych'"
LoadError: cannot infer basepath
    require_relative at uri:classloader:/jruby/kernel/kernel.rb:9
              <eval> at (eval):1
                eval at org/jruby/RubyKernel.java:979
      block in setup at /Users/spencer/jruby/jruby-9.0.0.0.rc1/lib/ruby/stdlib/jars/maven_exec.rb:33
               chdir at org/jruby/RubyDir.java:324
               setup at /Users/spencer/jruby/jruby-9.0.0.0.rc1/lib/ruby/stdlib/jars/maven_exec.rb:32
          initialize at /Users/spencer/jruby/jruby-9.0.0.0.rc1/lib/ruby/stdlib/jars/maven_exec.rb:22
          initialize at /Users/spencer/jruby/jruby-9.0.0.0.rc1/lib/ruby/stdlib/jars/classpath.rb:10
  require_jars_lock! at /Users/spencer/jruby/jruby-9.0.0.0.rc1/lib/ruby/stdlib/jar_dependencies.rb:162
   require_jars_lock at /Users/spencer/jruby/jruby-9.0.0.0.rc1/lib/ruby/stdlib/jar_dependencies.rb:173
         require_jar at /Users/spencer/jruby/jruby-9.0.0.0.rc1/lib/ruby/stdlib/jar_dependencies.rb:179
         require_jar at /Users/spencer/jruby/jruby-9.0.0.0.rc1/lib/ruby/stdlib/jar_dependencies.rb:263
               <top> at /Users/spencer/jruby/jruby-9.0.0.0.rc1/lib/ruby/stdlib/psych_jars.rb:5
             require at org/jruby/RubyKernel.java:940
              (root) at /Users/spencer/jruby/jruby-9.0.0.0.rc1/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
               <top> at /Users/spencer/jruby/jruby-9.0.0.0.rc1/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54
             require at org/jruby/RubyKernel.java:940
              (root) at /Users/spencer/jruby/jruby-9.0.0.0.rc1/lib/ruby/stdlib/psych.rb:3
               <top> at -e:1
Spencers-iMac:jruby spencer$ 
@mkristian mkristian self-assigned this Jun 22, 2015
@mkristian
Copy link
Member

thanx for the easy "test case" - will release a fixed jar-dependencies soon

@swistaczek
Copy link

👍

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

No branches or pull requests

3 participants