-
-
Notifications
You must be signed in to change notification settings - Fork 922
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
Errno::ENOTDIR on Dir.chdir into jar #1026
Comments
per default jruby places its gems into jruby.home/lib/ruby/gems/shared 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. |
It seems the only reason bundler does a |
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 |
refactored - unshared chdir/mkdir dir resolution bits resolves jrubyGH-1026
Warbler::Traits::Bundler
packages gems into a jar.Running
require "bundler/setup"
inside the jar will try toDir.chdir
into these directories in order to evaluate gemspecs in their respective local path context.This fails ... and as far as I understand basically renders
Warbler::Traits::Bundler
useless?Here's a related issue on bundler: rubygems/bundler#1865 (comment)
The text was updated successfully, but these errors were encountered: