Warbler bundles own gemspec, even when in an excluded bundler group #142

Closed
bjeanes opened this Issue Mar 8, 2013 · 0 comments

Comments

Projects
None yet
1 participant
Contributor

bjeanes commented Mar 8, 2013

Given the following:

# Gemfile
gem "warbler", group: :development

# config/warbler.rb
config.bundle_without = [:development] # or default which includes :development

When trying to launch a jar/war that loads bundler gems, the following error and subsequent command exit will occur:

$ java -jar app.war
2013-03-08 14:10:29.338:INFO:oejs.Server:jetty-8.y.z-SNAPSHOT
2013-03-08 14:10:29.374:INFO:oejw.WebInfConfiguration:Extract jar:file:/tmp/app/app.war!/ to /private/var/folders/my/3rf8_rm12yd2xftfpx0f785m0000gn/T/warbler3740388889988910924webroot/app.war/work/jetty-0.0.0.0-8080-app.war-_-any-/webapp
2013-03-08 14:10:38.016:INFO:/:INFO: jruby 1.7.3 (1.9.3p385) 2013-02-21 dac429b on OpenJDK 64-Bit Server VM 1.7.0-jdk7u6-b20-20120719 [darwin-x86_64]
2013-03-08 14:10:38.018:INFO:/:INFO: using a shared (threadsafe!) runtime
There was a LoadError while evaluating warbler.gemspec:
no such file to load -- warbler/version from
  /private/var/folders/my/3rf8_rm12yd2xftfpx0f785m0000gn/T/warbler3740388889988910924webroot/app.war/work/jetty-0.0.0.0-8080-app.war-_-any-/webapp/WEB-INF/gems/bundler/gems/warbler-ce3ce4df1375/warbler.gemspec:3:in `eval_gemspec'

Does it try to require a relative path? That's been removed in Ruby 1.9.

From the looks of it, it is including its own gemspec (or possibly all gemspecs) regardless of the bundle groups that should be included in the JAR/WAR. This is only a problem when a gem's gemspec requires a file from its own load path, like warbler does.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@bjeanes bjeanes referenced this issue in SquareSquash/web Mar 8, 2013

Closed

Support building a deployable and self-executable WAR file of Squash #57

5 of 6 tasks complete

@bjeanes bjeanes closed this Nov 28, 2017

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