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

bundler using jars can't load with no ruby installed #157

Closed
betelgeuse opened this Issue Apr 29, 2013 · 5 comments

Comments

Projects
None yet
4 participants

When I try to run the created jars with env -i java -jar I get failures from bundler that it can't load its files. I will be pushing a failed test. Here's the output:

betelgeuse@mac ~/checkouts/warbler $ bundle exec rspec -d --tag wip spec/warbler/bundler_spec.rb 
Run options: include {:wip=>true}
LoadError: no such file to load -- bundler/dep_proxy
    expand_dependencies at jar:file:/Users/betelgeuse/checkouts/warbler/tmp/created_jar.jar!/gems/bundler-1.3.5/lib/bundler/definition.rb:556
                   each at org/jruby/RubyArray.java:1613
    expand_dependencies at jar:file:/Users/betelgeuse/checkouts/warbler/tmp/created_jar.jar!/gems/bundler-1.3.5/lib/bundler/definition.rb:555
                   each at org/jruby/RubyArray.java:1613
    expand_dependencies at jar:file:/Users/betelgeuse/checkouts/warbler/tmp/created_jar.jar!/gems/bundler-1.3.5/lib/bundler/definition.rb:553
  converge_locked_specs at jar:file:/Users/betelgeuse/checkouts/warbler/tmp/created_jar.jar!/gems/bundler-1.3.5/lib/bundler/definition.rb:524
                resolve at jar:file:/Users/betelgeuse/checkouts/warbler/tmp/created_jar.jar!/gems/bundler-1.3.5/lib/bundler/definition.rb:167
                  specs at jar:file:/Users/betelgeuse/checkouts/warbler/tmp/created_jar.jar!/gems/bundler-1.3.5/lib/bundler/definition.rb:114
              specs_for at jar:file:/Users/betelgeuse/checkouts/warbler/tmp/created_jar.jar!/gems/bundler-1.3.5/lib/bundler/definition.rb:159
        requested_specs at jar:file:/Users/betelgeuse/checkouts/warbler/tmp/created_jar.jar!/gems/bundler-1.3.5/lib/bundler/definition.rb:148
        requested_specs at jar:file:/Users/betelgeuse/checkouts/warbler/tmp/created_jar.jar!/gems/bundler-1.3.5/lib/bundler/environment.rb:18
                  setup at jar:file:/Users/betelgeuse/checkouts/warbler/tmp/created_jar.jar!/gems/bundler-1.3.5/lib/bundler/runtime.rb:13
                  setup at jar:file:/Users/betelgeuse/checkouts/warbler/tmp/created_jar.jar!/gems/bundler-1.3.5/lib/bundler.rb:120
                 (root) at jar:file:/Users/betelgeuse/checkouts/warbler/tmp/created_jar.jar!/gems/bundler-1.3.5/lib/bundler/setup.rb:17
                require at org/jruby/RubyKernel.java:1027
                 (root) at jar:file:/var/folders/vq/sv00hgxs7nlf_p_76vm2ps1c0000gn/T/jruby3568052306151186079extract/jruby-stdlib-1.7.3.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:1
                require at jar:file:/var/folders/vq/sv00hgxs7nlf_p_76vm2ps1c0000gn/T/jruby3568052306151186079extract/jruby-stdlib-1.7.3.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:60
                   load at org/jruby/RubyKernel.java:1046
                 (root) at file:/Users/betelgeuse/checkouts/warbler/tmp/created_jar.jar!/sample_bundler_hello/bin/sample_bundler_hello.rb:2
                require at org/jruby/RubyKernel.java:1027
                 (root) at file:/Users/betelgeuse/checkouts/warbler/tmp/created_jar.jar!/META-INF/main.rb:1
                 (root) at file:/Users/betelgeuse/checkouts/warbler/tmp/created_jar.jar!/META-INF/main.rb:1
error: org.jruby.embed.EvalFailedException: (LoadError) no such file to load -- bundler/dep_proxy
F

Failures:

  1) Warbler::Jar with Bundler in a trivial bundler app should create jar and be able to run it with no environment
     Failure/Error: output.should == "Hello World\n"
       expected: "Hello World\n"
            got: "" (using ==)
       Diff:
       @@ -1,2 +1 @@
       -Hello World
     # ./spec/warbler/bundler_spec.rb:162:in `block (3 levels) in <top (required)>'

Finished in 4.34 seconds
1 example, 1 failure

Failed examples:

rspec ./spec/warbler/bundler_spec.rb:158 # Warbler::Jar with Bundler in a trivial bundler app should create jar and be able to run it with no environment

betelgeuse added a commit to betelgeuse/warbler that referenced this issue Apr 29, 2013

Demonstrate issue with clean environment
Show a failing test for jruby/warbler#157
When I unset GEM_HOME and GEM_PATH from my environment I can't run the
created jars.

Still seeing this issue. Is there a recommended workaround?

Owner

mkristian commented May 19, 2016

this will be fixed with https://github.com/mkristian/warbler/tree/bundler

PR still needs a test

Probably not the "test" you were looking for, but I tried your branch and it worked perfectly 😄

Thank you @mkristian 👍

Owner

mkristian commented May 19, 2016

great that get an extra confirmation, appreciated :)

Owner

mkristian commented Jun 10, 2016

fixed via #383

@mkristian mkristian closed this Jun 10, 2016

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