sidekiq / sidekiq

Simple, efficient background processing for Ruby
https://sidekiq.org
Other
13.17k stars 2.42k forks source link

Bundler hangs #656

Closed brandonhilkert closed 11 years ago

brandonhilkert commented 11 years ago

I spent some time last night in the travis IRC channel to try to figure out why the tests weren't buildin. After someone there tried to build Sidekiq on their local machine, they got the same behavior. I, however, don't see it, but I think it's because my machine already has the version of the development dependencies that Sidekiq requires.

Something bundle install is doing causes it to hang. I was able to replicate this issue by doing bundle outdated on my already created gemset. That should be going out to fetch info about each gem, and it, too, just hangs when contacting rubygems.

I use Rbenv without gemsets, but I was hoping someone that uses RVM could create a new gemset for Sidekiq, and try to do an initial bundle install and see if they get the same behavior.

If so, I believe this would block anyone new from contributing if they can't bundle Sidekiq's dependencies.

mperham commented 11 years ago

It just worked fine for me.

brandonhilkert commented 11 years ago

Are you using a Ruby version manager? If so, which one? And does your bundle outdated command work normally as well?


http://brandonhilkert.com

On Sun, Jan 27, 2013 at 10:53 AM, Mike Perham notifications@github.comwrote:

It just worked fine for me.

— Reply to this email directly or view it on GitHubhttps://github.com/mperham/sidekiq/issues/656#issuecomment-12756105.

mperham commented 11 years ago

outdated works fine.

> rvm -v

rvm 1.17.10 (stable)
brandonhilkert commented 11 years ago

Interesting...From what I could tell, Travis is using rvm as well. Here's my verbose output:

[11:48:42] bhilkert [~/Dropbox/code/sidekiq] (master) $ bundle outdated --verbose
Fetching gem metadata from http://rubygems.org/
Query List: ["sidekiq", "minitest", "sinatra", "slim", "rake", "actionmailer", "activerecord", "celluloid", "sqlite3", "simplecov", "pry", "shotgun", "redis", "redis-namespace", "connection_pool", "multi_json"]
Query Gemcutter Dependency Endpoint API: sidekiq minitest sinatra slim rake actionmailer activerecord celluloid sqlite3 simplecov pry shotgun redis redis-namespace connection_pool multi_json
Fetching from: http://rubygems.org/api/v1/dependencies?gems=sidekiq,minitest,sinatra,slim,rake,actionmailer,activerecord,celluloid,sqlite3,simplecov,pry,shotgun,redis,redis-namespace,connection_pool,multi_json
HTTP Success
Query List: ["mail", "actionpack", "text-format", "tzinfo", "arel", "activemodel", "activesupport", "facter", "timers", "hoe", "win32console", "method_source", "slop", "coderay", "spoon", "ruby_parser", "yard", "rspec", "rack", "launchy", "compass", "sass", "sprockets-sass", "simplecov-html", "tilt", "rack-protection", "mongrel", "rack-test", "temple", "escape_utils", "ffi"]
Query Gemcutter Dependency Endpoint API: mail actionpack text-format tzinfo arel activemodel activesupport facter timers hoe win32console method_source slop coderay spoon ruby_parser yard rspec rack launchy compass sass sprockets-sass simplecov-html tilt rack-protection mongrel rack-test temple escape_utils ffi
Fetching from: http://rubygems.org/api/v1/dependencies?gems=mail,actionpack,text-format,tzinfo,arel,activemodel,activesupport,facter,timers,hoe,win32console,method_source,slop,coderay,spoon,ruby_parser,yard,rspec,rack,launchy,compass,sass,sprockets-sass,simplecov-html,tilt,rack-protection,mongrel,rack-test,temple,escape_utils,ffi
HTTP Success
Query List: ["erubis", "sprockets", "journey", "builder", "rack-cache", "rack-mount", "i18n", "bcrypt-ruby", "memcache-client", "haml", "chunky_png", "fssm", "bones", "RubyInline", "rubyforge", "gemcutter", "configuration", "addressable", "treetop", "mime-types", "tlsmail", "daemons", "fastthread", "gem_plugin", "cgi_multipart_eof_fix", "test-spec", "camping", "fcgi", "ruby-openid", "thin", "rspec-mocks", "rspec-expectations", "rspec-core", "cucumber", "diff-lcs", "syntax", "spicycode-rcov", "sexp_processor", "ParseTree", "sprockets-helpers", "text-hyphen"]
Query Gemcutter Dependency Endpoint API: erubis sprockets journey builder rack-cache rack-mount i18n bcrypt-ruby memcache-client haml chunky_png fssm bones RubyInline rubyforge gemcutter configuration addressable treetop mime-types tlsmail daemons fastthread gem_plugin cgi_multipart_eof_fix test-spec camping fcgi ruby-openid thin rspec-mocks rspec-expectations rspec-core cucumber diff-lcs syntax spicycode-rcov sexp_processor ParseTree sprockets-helpers text-hyphen
Fetching from: http://rubygems.org/api/v1/dependencies?gems=erubis,sprockets,journey,builder,rack-cache,rack-mount,i18n,bcrypt-ruby,memcache-client,haml,chunky_png,fssm,bones,RubyInline,rubyforge,gemcutter,configuration,addressable,treetop,mime-types,tlsmail,daemons,fastthread,gem_plugin,cgi_multipart_eof_fix,test-spec,camping,fcgi,ruby-openid,thin,rspec-mocks,rspec-expectations,rspec-core,cucumber,diff-lcs,syntax,spicycode-rcov,sexp_processor,ParseTree,sprockets-helpers,text-hyphen
HTTP Success
Query List: ["little-plugger", "loquacious", "bones-git", "bones-extras", "markaby", "metaid", "mab", "term-ansicolor", "polyglot", "gherkin", "json_pure", "json", "abstract", "net-scp", "maruku", "ZenTest", "archive-tar-minitar", "nokogiri", "rcov", "SexpProcessor", "multimap", "ruby-yadis", "hike", "flexmock", "mocha", "eventmachine", "eventmachine-le", "http_parser.rb", "preforker", "facets"]
Query Gemcutter Dependency Endpoint API: little-plugger loquacious bones-git bones-extras markaby metaid mab term-ansicolor polyglot gherkin json_pure json abstract net-scp maruku ZenTest archive-tar-minitar nokogiri rcov SexpProcessor multimap ruby-yadis hike flexmock mocha eventmachine eventmachine-le http_parser.rb preforker facets
Fetching from: http://rubygems.org/api/v1/dependencies?gems=little-plugger,loquacious,bones-git,bones-extras,markaby,metaid,mab,term-ansicolor,polyglot,gherkin,json_pure,json,abstract,net-scp,maruku,ZenTest,archive-tar-minitar,nokogiri,rcov,SexpProcessor,multimap,ruby-yadis,hike,flexmock,mocha,eventmachine,eventmachine-le,http_parser.rb,preforker,facets
HTTP Success
Query List: ["bones-rcov", "bones-rubyforge", "bones-rspec", "bones-zentest", "git", "trollop", "spruz", "metaclass", "net-ssh", "racc", "tenderlove-frex", "rake-compiler", "rexical", "weakling"]
Query Gemcutter Dependency Endpoint API: bones-rcov bones-rubyforge bones-rspec bones-zentest git trollop spruz metaclass net-ssh racc tenderlove-frex rake-compiler rexical weakling
Fetching from: http://rubygems.org/api/v1/dependencies?gems=bones-rcov,bones-rubyforge,bones-rspec,bones-zentest,git,trollop,spruz,metaclass,net-ssh,racc,tenderlove-frex,rake-compiler,rexical,weakling
HTTP Success
Query List: ["needle", "jruby-pageant", "echoe"]
Query Gemcutter Dependency Endpoint API: needle jruby-pageant echoe
Fetching from: http://rubygems.org/api/v1/dependencies?gems=needle,jruby-pageant,echoe
HTTP Success
Query List: ["highline", "allison", "rdoc"]
Query Gemcutter Dependency Endpoint API: highline allison rdoc
Fetching from: http://rubygems.org/api/v1/dependencies?gems=highline,allison,rdoc
HTTP Success
Query List: ["termios"]
Query Gemcutter Dependency Endpoint API: termios
Fetching from: http://rubygems.org/api/v1/dependencies?gems=termios
HTTP Success
Query List: []
Unmet Dependencies: ["tenderlove-frex", "spicycode-rcov"]
Fetching gem metadata from http://rubygems.org/
Query List: ["tenderlove-frex", "spicycode-rcov"]
Query Gemcutter Dependency Endpoint API: tenderlove-frex spicycode-rcov
Fetching from: http://rubygems.org/api/v1/dependencies?gems=tenderlove-frex,spicycode-rcov
HTTP Success
Query List: []

After that last thing above, it just sits there forever.

A quick search, and a few people are having similar issues installing tenderlove-frex.

http://stackoverflow.com/questions/13443332/bundle-update-stuck

http://stackoverflow.com/questions/13498927/could-not-find-gem-tenderlove-frex-when-installing-the-gem-melomel-where-can

What's the output of this command for you? gem sources

[12:00:38] bhilkert [~/Dropbox/code/sidekiq] (master) $ gem sources
*** CURRENT SOURCES ***

http://rubygems.org/
brandonhilkert commented 11 years ago

Here's some other cases:

https://groups.google.com/forum/?fromgroups=#!topic/rubygems-org/sgpO6ed_kAM

http://iqwen.net/question/72831

http://proxy.obd2tool.com/index.php?url=141L19y91q1HyOyr0I1CyX1s0UyGyFyMyb1v121t1lyd0Kyj1tyN1xya

According to that first link, there was an issue with the bundler-api gem, https://github.com/rubygems/bundler-api/issues/17, but doesn't look like it's resolved for this case at least.

brandonhilkert commented 11 years ago

I submitted this issue, and got some feedback: https://github.com/rubygems/bundler-api/issues/21#issuecomment-12758507

My goal with this is to get Travis to work. Yesterday, a pull request was merged in that broke some tests that would've easily been caught with the test suite running.

If I remove the :development group from the Gemfile, all works well. Since Travis doesn't need that ENV, or any of the gems in it, I'm thinking we customize the command sent to Travis like:

bundler_args: --without development

Thoughts?

mperham commented 11 years ago

Seems reasonable to me.

Where is that tenderlove gem coming from? I've actually never heard if that gem.

On 27 Jan 2013, at 11:53, Brandon Hilkert notifications@github.com wrote:

I submitted this issue, and got some feedback: rubygems/bundler-api#21

My goal with this is to get Travis to work. Yesterday, a pull request was merged in that broke some tests that would've easily been caught with the test suite running.

If I remove the :development group from the Gemfile, all works well. Since Travis doesn't need that ENV, or any of the gems in it, I'm thinking we customize the command sent to Travis like:

bundler_args: --without development

Thoughts?

— Reply to this email directly or view it on GitHub.

brandonhilkert commented 11 years ago

A couple other similar reports of this behavior in the last few days. https://github.com/carlhuda/bundler/issues/2273

brandonhilkert commented 11 years ago

It doesn't appear that that worked https://travis-ci.org/mperham/sidekiq/jobs/4416497

I'm honestly at a loss...without access to their command line, it's really hard to judge what could be causing this.

mperham commented 11 years ago

Open a Travis support ticket?

brandonhilkert commented 11 years ago

Given that they were able to reproduce this locally on their own machine, I think they'll just say it's the apps problem. Although, it's not completely clear on what causes this since you and I get differing behavior from the bundle commands.

On Jan 27, 2013, at 3:41 PM, Mike Perham notifications@github.com wrote:

Open a Travis support ticket?

— Reply to this email directly or view it on GitHubhttps://github.com/mperham/sidekiq/issues/656#issuecomment-12761091.

mperham commented 11 years ago

Don't know what to do for this. Closing.

brandonhilkert commented 11 years ago

Here's some more info. https://github.com/rubygems/bundler-api/issues/21#issuecomment-12984912

I looked at Gemfile.lock and rack is in there with a dependency of version 1.4.0.

I resolved it by changing the dev section of the Gemfile to be:

group :development do
  gem 'pry', :platform => :mri
  gem 'shotgun'
  gem 'rack', '~> 1.4.0'
end

That was the version of rack that was active for me. Shotgun seems to depend on anything `>= 1.0' so that should work. I'm a little confused about the fact that there's a gemspec that defines dependencies and a Gemfile. Seems like creating a gem from scratch with bundle suggests only using the gemspec. Here's what's generated in a skeleton Gemfile:

source 'https://rubygems.org'

# Specify your gem's dependencies in sucker_punch.gemspec
gemspec

Add that rack line to both Gemfile and .gemspec fixed the issue, so I'll take suggestions as to where to put it, if of course you want it in there at all.

mperham commented 11 years ago

Good find. Thanks for following up.