Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

bundle install hangs indefinitely #703

Closed
jrdioko opened this issue Sep 17, 2010 · 11 comments
Closed

bundle install hangs indefinitely #703

jrdioko opened this issue Sep 17, 2010 · 11 comments

Comments

@jrdioko
Copy link

jrdioko commented Sep 17, 2010

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:

source :rubygems

gem "abstract"
gem "actionmailer"
gem "actionpack"
gem "actionwebservice"
gem "activerecord"
gem "activerecord-activesalesforce-adapter"
gem "activeresource"
gem "activesalesforce"
gem "activesupport"
gem "acts_as_ferret"
gem "acts_as_reportable"
gem "addressable"
gem "ambition"
gem "archive-tar-minitar"
gem "aws-s3"
gem "bcrypt-ruby"
gem "BlueCloth"
gem "builder"
gem "capistrano"
gem "cgi_multipart_eof_fix"
gem "coderay"
gem "color"
gem "currency"
gem "daemons"
gem "data_objects"
gem "diff-lcs"
gem "dm-aggregates"
gem "dm-core"
gem "dm-migrations"
gem "dm-serializer"
gem "dm-sweatshop"
gem "dm-timestamps"
gem "dm-types"
gem "dm-validations"
gem "do_sqlite3"
gem "english"
gem "erubis"
gem "eventmachine"
gem "extlib"
gem "facets"
gem "fastercsv"
gem "fastthread"
gem "feedtools"
gem "ferret"
gem "gem_plugin"
gem "god"
gem "haml"
gem "highline"
gem "hoe"
gem "hpricot"
gem "htmlentities"
gem "image_science"
gem "json"
gem "json_pure"
gem "libxml-ruby"
gem "macaddr"
gem "mailfactory"
gem "markaby"
gem "memcache-client"
gem "merb"
gem "merb-action-args"
gem "merb-assets"
gem "merb-auth"
gem "merb-auth-core"
gem "merb-auth-more"
gem "merb-auth-slice-password"
gem "merb-cache"
gem "merb-core"
gem "merb-exceptions"
gem "merb-gen"
gem "merb-haml"
gem "merb-helpers"
gem "merb-mailer"
gem "merb-more"
gem "merb-param-protection"
gem "merb-slices"
gem "merb_activerecord"
gem "merb_datamapper"
gem "merb_has_flash"
gem "merb_helpers"
gem "merb_paginate"
gem "mime-types"
gem "mini_magick"
gem "mocha"
gem "money"
gem "mongrel"
gem "mysql"
gem "needle"
gem "net-scp"
gem "net-sftp"
gem "net-ssh"
gem "net-ssh-gateway"
gem "open4"
gem "ParseTree"
gem "passenger"
gem "pdf-writer"
gem "rack"
gem "rails", "2.2.2"
gem "rake"
gem "randexp"
gem "rcov"
gem "rdoc"
gem "RedCloth"
gem "RubyInline"
gem "rspec"
gem "rubigen"
gem "ruby-lsapi"
gem "ruby-openid"
gem "ruby-yadis"
gem "ruby2ruby"
gem "rubyforge"
gem "ruport"
gem "sentry"
gem "sexp_processor"
gem "simple-rss"
gem "syntax"
gem "templater"
gem "termios"
gem "thor"
gem "transaction-simple"
gem "tzinfo"
gem "uuid"
gem "uuidtools"
gem "will_paginate"
gem "xml-simple"
gem "ZenTest"
gem "zipruby"
@radar
Copy link
Contributor

radar commented Sep 17, 2010

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.

@jrdioko
Copy link
Author

jrdioko commented Sep 17, 2010

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?

@radar
Copy link
Contributor

radar commented Sep 17, 2010

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:

 gem 'rails', '2.3.9'

Try starting with a basic Gemfile and then adding gems as you need them.

@myronmarston
Copy link
Contributor

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.

@indirect
Copy link
Member

Resolving a gem dependency graph is a hard problem, with no bounds. With a crazy Gemfile like that, you might be able to finish bundle install after several days, or you might not be able to finish it before the heat death of the universe.

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. ;)

@indirect
Copy link
Member

(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. :)

@jrdioko
Copy link
Author

jrdioko commented Sep 20, 2010

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 gem list (which includes gems used by this application as well as others) and pare down from there. If there's any more intelligent way to do it, let me know.

@indirect
Copy link
Member

Start with the default gemfile:

gem "rails", "~>x.x.x"

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 3.0.0.

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. :)

@jrdioko
Copy link
Author

jrdioko commented Sep 20, 2010

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.

@indirect
Copy link
Member

That's extremely easy to check: search for require or config.gem.

@jrdioko
Copy link
Author

jrdioko commented Sep 20, 2010

True. Thanks again.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants