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
No such file to load -- bundler/setup (with bundler 1.3.4) #144
Comments
+1 I haven't had a chance yet to delve deeply into this problem, but I was able to demonstrate that for bundler versions 1.3.0 and newer, warbler improperly packages the bundler gem. More specifically, the directory structure of the packaged bundler gem is incorrect in the war file. As was the case for Brandon, downgrading to bundler 1.2.4 gets our app to load. We're running jruby 1.7.3, warbler 1.3.6, jruby-rack 1.1.13.1, and rails 3.2.13. |
Do you have a sample app that can reproduce this? |
I believe I'm experiencing the same issue, though it's failing to load a different file. I've created a sample app (with README) here: https://github.com/doxavore/warbler144 but I'm afraid I haven't had any luck tracking down the underlying cause. |
I ran your sample app and could not reproduce the error. Here's what I'm using:
Could you add your Gemfile.lock so I can see if there any other differences? |
I've tried it with JRuby 1.7.2 on both Oracle Java and OpenJDK, and both result in the same error. I am running on Ubuntu 12.10, however.
I've pushed the Gemfile.lock I'm using, as well as the generated myapp.jar. I've tried adding Bundler and specifying jruby-jars to 1.7.2, then using If you can run myapp.jar then I suppose it must be something different about my execution environment. Otherwise, perhaps you can spot a difference between my generated JAR and then one you generate? If you want to post the JAR you generate that works on your machine, I could create another repo of my exploded JAR and diff them. |
I've pushed my jar here: https://github.com/jkutner/warbler144 But the jar in your repo works for me, as well as the one I created myself. All my gems are the same :( sorry. Here's more info on my system:
$ uname -a
Darwin largo.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
$ java -version
java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)
$ jruby -v
jruby 1.7.2 (1.9.3p327) 2013-01-04 302c706 on Java HotSpot(TM) 64-Bit Server VM 1.7.0_09-b05 [darwin-x86_64]
$ bundle version
Bundler version 1.3.5
|
@BrandonMathis or @marcusgpeterson - perhaps you could give my test repo a try and at least determine if we're having the same issue? As expected, the jar from @jkutner fails with the same error on my machine. I tried putting some debugging before it fails out, and with !/gems/bundler-1.3.5/lib in the load path, I see no reason why
|
Sorry for all the posts, but I've found a workaround that allows my sample app to run: doxavore/warbler144@ddc0806 It seems all of the things that Bundler sets up as an autoload don't actually autoload in my environment. I just kept running it and requiring each load error until the app ran through. I'm inclined to believe this may be a totally different issue than originally reported here. Unless anyone has any pointers, I'll continue to attempt to debug this on my own and ping around in #jruby |
Just to close the loop on your issue, @doxavore - I'm able to run your test repo without any trouble. I've been pretty busy of late, but hopefully I'll have a chance to reproduce my issue in a sample app soon and report my findings here. |
Another data point: the problem seems to be limited to bundles that have been installed in "--deployment" mode. |
I've been able to demonstrate the problem using a forked version of @doxavore's repo: https://github.com/marcusgpeterson/warbler144 My modified README describes the steps required to reproduce. |
Thanks for setting this up. I can clearly see the problem now. I've got some specs that reproduce it, but it'll take some time to figure out how to fix them. |
@marcusgpeterson thanks for putting that together 👍 this helps me better understand what the error I've been wrestling with for the past few months now |
is bundling with |
Bundling with While not being able to install system gems sometimes feels like an unreasonable restriction, the Does this make sense? |
@BrandonMathis you bet! :) |
bundle with |
Can you confirm that what's in master fixes this issue? I tested on @marcusgpeterson repo and it seems to work, but I'd like to know that it works in the real world too before closing this issue. |
@jkutner I've verified that your changes fix the problem in both my test repo and in my real-world web application. Thanks a ton for getting this working. Fantastic job! |
I"m going to close this even though I haven't heard from @BrandonMathis. We can reopen it if there is still a problem. Thanks for the help in nailing this down! |
Yep, the issue is fixed for me on master. |
I'm having this issue with 1.4.0.beta2. Here's my repo with a sample: https://github.com/petergillardmoss/jruby-middleman-example (see commit 26a7b65ea5f819721686429303e9ce6bba64f0b3) |
I think there may be a regression on this issue. I'm hitting the same problem "LoadError: no such file to load -- bundler/index" when trying to run a jar generated with warble. In my environment I am using Warbler (1.4.5), Bundler (1.9.2), JRuby (1.7.19) on Ubuntu (14.04.02) After arriving at this issue (#144), I cloned the repo from @doxavore and followed the steps to reproduce the problem and arrived at the same error: LoadError: no such file to load -- bundler/index. Also, I tried to run the jar from @jkutner and it gave me that same error. |
maybe encountering jruby/warbler#144
We've had this issue before 75 and 27. Tomcat is giving me a
org.jruby.rack.RackInitializationException: no such file to load -- bundler/setup
error when I try to load the appDowngrading to bundler v 1.2.4 fixed this for me.
I thought I would post this issue with hopes someone can duplicate it and perhaps together we can ascertain a fix.
The text was updated successfully, but these errors were encountered: