Skip to content

Instantly share code, notes, and snippets.

@rsutphin
Created April 1, 2011 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rsutphin/898413 to your computer and use it in GitHub Desktop.
Save rsutphin/898413 to your computer and use it in GitHub Desktop.
Test case for JRuby/1.9 mode/bundler-for-gem problem
Gem::Specification.new do |s|
s.name = 'foo'
s.version = '1.0.0'
# any line starting at column zero at this point provokes the problem
end
@rsutphin
Copy link
Author

rsutphin commented Apr 1, 2011

This project works as expected with JRuby in its default configuration. In 1.9 mode, the following happens:

$ echo $JRUBY_OPTS
-J-Djruby.compat.version=RUBY1_9
$ ruby -v
jruby 1.6.0 (ruby 1.9.2 patchlevel 136) (2011-03-15 f3b6154) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_22) [darwin-x86_64-java]
$ bundle show
RuntimeError: null; expected '<document start>', but found Scalar
          parse at org/jruby/ext/psych/PsychParser.java:242
   parse_stream at /Users/rsutphin/.rvm/rubies/jruby-1.6.0/lib/ruby/1.9/psych.rb:148
          parse at /Users/rsutphin/.rvm/rubies/jruby-1.6.0/lib/ruby/1.9/psych.rb:119
           load at /Users/rsutphin/.rvm/rubies/jruby-1.6.0/lib/ruby/1.9/psych.rb:106
      from_yaml at /Users/rsutphin/.rvm/rubies/jruby-1.6.0/lib/ruby/site_ruby/1.8/rubygems/specification.rb:480
   load_gemspec at /Users/rsutphin/.rvm/gems/jruby-1.6.0@bundler-prob/gems/bundler-1.0.10/lib/bundler.rb:235
          chdir at org/jruby/RubyDir.java:335
   load_gemspec at /Users/rsutphin/.rvm/gems/jruby-1.6.0@bundler-prob/gems/bundler-1.0.10/lib/bundler.rb:232
        gemspec at /Users/rsutphin/.rvm/gems/jruby-1.6.0@bundler-prob/gems/bundler-1.0.10/lib/bundler/dsl.rb:32
         (eval) at /private/tmp/898413/Gemfile:1
  instance_eval at org/jruby/RubyBasicObject.java:1709
       evaluate at /Users/rsutphin/.rvm/gems/jruby-1.6.0@bundler-prob/gems/bundler-1.0.10/lib/bundler/dsl.rb:7
          build at /Users/rsutphin/.rvm/gems/jruby-1.6.0@bundler-prob/gems/bundler-1.0.10/lib/bundler/definition.rb:17
     definition at /Users/rsutphin/.rvm/gems/jruby-1.6.0@bundler-prob/gems/bundler-1.0.10/lib/bundler.rb:136
           load at /Users/rsutphin/.rvm/gems/jruby-1.6.0@bundler-prob/gems/bundler-1.0.10/lib/bundler.rb:124
           show at /Users/rsutphin/.rvm/gems/jruby-1.6.0@bundler-prob/gems/bundler-1.0.10/lib/bundler/cli.rb:297
       __send__ at org/jruby/RubyBasicObject.java:1665
           send at org/jruby/RubyKernel.java:2059
            run at /Users/rsutphin/.rvm/gems/jruby-1.6.0@bundler-prob/gems/bundler-1.0.10/lib/bundler/vendor/thor/task.rb:21
    invoke_task at /Users/rsutphin/.rvm/gems/jruby-1.6.0@bundler-prob/gems/bundler-1.0.10/lib/bundler/vendor/thor/invocation.rb:118
       dispatch at /Users/rsutphin/.rvm/gems/jruby-1.6.0@bundler-prob/gems/bundler-1.0.10/lib/bundler/vendor/thor.rb:246
          start at /Users/rsutphin/.rvm/gems/jruby-1.6.0@bundler-prob/gems/bundler-1.0.10/lib/bundler/vendor/thor/base.rb:389
         (root) at /Users/rsutphin/.rvm/gems/jruby-1.6.0@bundler-prob/gems/bundler-1.0.10/bin/bundle:13
           load at org/jruby/RubyKernel.java:1072
         (root) at /Users/rsutphin/.rvm/gems/jruby-1.6.0@bundler-prob/bin/bundle:19

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