bundle install hangs indefinitely #703
Comments
Are you sure this is your Gemfile? You seem to be requiring the latest activesupport which is now 3.0.0 and you said you're using Rails 2. |
I realize it's a little wacky. I inherited this application and am trying to get it running in a new environment. At first I tried specifying all the version numbers for all the gems explicitly, but I ran into other issues. I stripped out the version numbers to see if I could get any further, then I'll put more effort into seeing where I need explicit versions, which gems I don't need, etc. But having weird versions shouldn't make bundler hang without completing, right? |
I don't know Bundler as well as indirect/carllerche/wycats/whoever, but I am leaning towards it's because your Gemfile is needlessly complex. For example, to get the Rails 2.3.9 gems and their dependencies, you only need this in your Gemfile:
Try starting with a basic Gemfile and then adding gems as you need them. |
You're also specifying both the rails gems and the merb gems. Is this a merb app or a rails app? You're using haml and erubis. Which templating engine are you using? You're using datamapper and activerecord. Which ORM are you using? You're using rake and thor. Which build utility gem are you using? You really shouldn't be using so many gems that overlap in responsibilities. |
Resolving a gem dependency graph is a hard problem, with no bounds. With a crazy Gemfile like that, you might be able to finish We'll try to add a resolver timeout or something like that. Maybe Yehuda will implement ECOMMON for Gemfiles that have both Rails and Merb in them. ;) |
(Just in case I did not make it clear: that Gemfile is crazy. You are off the reservation, and there's no way we can support a Gemfile like that. We'll try to give you an error message rather than just run forever, but you need a non-crazy Gemfile for Bundler to work for you. :) |
Ok, thanks all for the help. An error message warning of the issue is all I ask for :) The reason the Gemfile is crazy is because I'm inheriting an application that I didn't work on and trying to get it running on a new server. The only way I can think of to figure out the gem dependencies of the application is to start working with the |
Start with the default gemfile:
Replace the xes with the actual version of rails that you need. It'll be in config/environment.rb, unless it's a Rails 3 app, in which case you can just put Start your app, and watch for errors. When there's an error about not being able to load something, add that gem to the gemfile. Eventually, you'll have the whole list. :) |
Well that's more logical... I guess I was afraid of things being required or used in non-obvious paths through the application, but maybe that's an irrational fear. |
That's extremely easy to check: search for |
True. Thanks again. |
I'm trying to use bundler to manage gems for a Rails 2 application. When I run
/opt/ruby-enterprise-1.8.7-2010.02/bin/bundle install
in the application directory, it tells me "Fetching source index for http://rubygems.org/", then hangs indefinitely (I've even left it overnight and it never gets further).I'm using bundler 1.0.0. I've tried deleting my ~/.gem and ~/.bundler files. I'm not using RVM. I don't have a Gemfile.lock.
bundle config
lists no settings. There are no exceptions or logging I can find. My Gemfile follows:The text was updated successfully, but these errors were encountered: