carlhuda/bundler — Issue #1483: jruby on heroku 'Could not find rake-0.9.2 in any of the sources'
Author: caike
Created: 2011-10-17 15:24:13+00:00
State: open

I'm deploying JRuby to heroku and I'm running into this issue where bundler cannot find rake during my Rails 3.1.0 application start up.

The bundling of the gems, which is triggered by Maven (pom.xml), works fine and I'm telling Bundler to install my gems to the '.gems' folder. This is the command that bundles my app's dependencies, also run from Maven:

```ruby
jruby -e "ENV['GEM_HOME']=File.join(Dir.pwd,'.gems');ENV['GEM_PATH']=File.join(Dir.pwd,'.gems');ENV['BUNDLE_GEMFILE']=File.join(Dir.pwd,'Jemfile');require'rubygems';require'bundler';require'bundler/cli';Bundler::CLI.new.install('.gems')"
```

I see that the bundling process works fine and it does find rake.

```bash
[INFO] --- jruby-rake-plugin:1.6.3:jruby (bundle-install) @ _my_app_name_ ---
[INFO] Fetching source index for http://rubygems.org/
[INFO] Installing rake (0.9.2)

(....)
[INFO] Your bundle is complete! It was installed into ./.gems
```

I've also added config via the heroku CLI, setting GEM_HOME to '.gems'. Still, during application startup, I get:

```bash
2011-10-17T15:11:56+00:00 app[web.1]: Bundler::GemNotFound: Could not find rake-0.9.2 in any of the sources
2011-10-17T15:11:56+00:00 app[web.1]: materialize at /app/.gems/gems/bundler-1.0.21/lib/bundler/spec_set.rb:88
2011-10-17T15:11:56+00:00 app[web.1]: map! at org/jruby/RubyArray.java:2376
2011-10-17T15:11:56+00:00 app[web.1]: materialize at /app/.gems/gems/bundler-1.0.21/lib/bundler/spec_set.rb:82
2011-10-17T15:11:56+00:00 app[web.1]: specs at /app/.gems/gems/bundler-1.0.21/lib/bundler/definition.rb:90
2011-10-17T15:11:56+00:00 app[web.1]: specs_for at /app/.gems/gems/bundler-1.0.21/lib/bundler/definition.rb:135
2011-10-17T15:11:56+00:00 app[web.1]: requested_specs at /app/.gems/gems/bundler-1.0.21/lib/bundler/definition.rb:124
2011-10-17T15:11:56+00:00 app[web.1]: requested_specs at /app/.gems/gems/bundler-1.0.21/lib/bundler/environment.rb:23
2011-10-17T15:11:56+00:00 app[web.1]: setup at /app/.gems/gems/bundler-1.0.21/lib/bundler/runtime.rb:11
2011-10-17T15:11:56+00:00 app[web.1]: setup at /app/.gems/gems/bundler-1.0.21/lib/bundler.rb:110
2011-10-17T15:11:56+00:00 app[web.1]: (root) at /app/.gems/gems/bundler-1.0.21/lib/bundler/setup.rb:17
```

I'm using JRuby 1.6.3. Wondering if this is an issue with bundler, rake or jruby-rake.
Any help would be appreciated. Thanks.