Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Errno::ENOTDIR on Dir.chdir into jar #1026
This fails ... and as far as I understand basically renders
Here's a related issue on bundler: bundler/bundler#1865 (comment)
per default jruby places its gems into
with an executable jar all the gems could be places there as well (that is what jbundler does when creating executable jars). then before adding the gems you could need to 'install' the gem so you have yaml gemspec file inside the specifications directory.
but I would say that is all more a warbler issue then jruby. chdir inside a jar or even inside jar inside war does not seems the right approach.
I think this isn't about warbler, but more about the general idea to use bundler within or with jar'ed gems.
Actually, it seems to me that getting bundler to work within a jar (e.g. requiring "bundler/setup" within jar-bootstrap.rb) leads to more issues. E.g. bundler tests for write permissions on the path and then assumes a user directory etc.
This would be neat though, and solve my usecase:
It seems I got this working by patching bundler:
... which works for me because the gemspec doesn't rely on relative paths. Obviously I wouldn't want to ship this, so solving the issue in either Bundler or Jruby would be awesome.
so basically you have gem packed into a jar !
I would just unpack that jar and install the gem via 'cd into/my/gem; gem
then your exectuable jar will just work.
but if you can pack your gem inside a jar you also can just build the gem
IMO Dir.chdir inside a zipfile just opens up a trail of new features,
but that are just my thoughts about that issue !!!
the problem with unpacking is that many folks won't have a local jruby/ruby installed, or a Rubygems installed, or the
I think the :path option in the Gemfile is cool, but I doubt that it would be accepted by the bundler team. Since the path to the jar doesn't actually matter, maybe a
Let me know if there is anything we can do in Warbler. I would offer that it is possible to write some kind of
On Sep 20, 2013, at 6:35 AM, mkristian wrote:
seems to have changed somewhere along the 9K releases, here a sample irb session output from 9.2 :
... so while its not raising it does produces a "weird" prefix, which should be simple to fix