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

bundle exec rake and rspec updates gems #3142

Closed
omegahm opened this issue Aug 19, 2014 · 11 comments
Closed

bundle exec rake and rspec updates gems #3142

omegahm opened this issue Aug 19, 2014 · 11 comments

Comments

@omegahm
Copy link

omegahm commented Aug 19, 2014

We have a very weird problem.

When running bundle exec rake 'hello' (which fails) it updates all of my gems. The same is true for bundle exec rspec, but not e.g. bundle exec echo 'hello'.

My (very truncated) Gemfile looks like this:

source ENV['GEMFURY_URL']
source 'http://rubygems.org'

ruby '1.9.3'

gem 'rails', '4.1.5'

gem 'pg'
...

This is occurring in Bundler v. 1.7.0. 1.6.4 works as expected. I couldn't try the prerelease, because it just stalled during bundle exec rake 'hello'.

@TimMoore
Copy link
Contributor

@omegahm could you please try the 1.7.1 prerelease (run gem install --pre bundler). We think this is fixed.

@TimMoore
Copy link
Contributor

Sorry... missed your last sentence. We're looking into the stall (see #3141).

@omegahm
Copy link
Author

omegahm commented Aug 19, 2014

Also applicable for newer Rubies. (Same error with 2.1.1)

@omegahm
Copy link
Author

omegahm commented Aug 19, 2014

@TimMoore I tried with 1.7.1 but after 10 minutes of nothing, I had to cancel it and go back to work 😄

@TimMoore
Copy link
Contributor

We should have a new prerelease or a 1.7.1 final release tomorrow. Sorry for the wait!

@jonhyman
Copy link

We're having this issue as well after upgrading to 1.7.0 when we try to use a rails console or run specs. I tried 1.7.1.pre.3 but it's still happening there as well.

@indirect
Copy link
Member

Please follow ISSUES and supply a reproduction case so I can make sure the problem is fixed. Thanks!

@jeremy
Copy link
Contributor

jeremy commented Aug 19, 2014

@omegahm did you happen to have Spring running?

@jonhyman
Copy link

Okay, @indirect, I got it now.

I have a repro at https://github.com/jonhyman/bundler-3142. I created a Rails project with an out of date gem that is not pegged to a certain version. It looks like the bug is happening when I have a second source.

  1. git clone git@github.com:jonhyman/bundler-3142.git
  2. Run rails console in the directory, this will actually now fail because it's going to upgrade the analytics-ruby gem to a version that changed its filename so the require fails.
  3. Look at git status, the Gemfile.lock will have changed and upgraded the gem unexpectedly.

image

bundle env

Bundler 1.7.0
Ruby 2.1.2 (2014-05-08 patchlevel 95) [x86_64-darwin13.0]
Rubygems 2.2.2
rvm 1.25.28 (stable)
GEM_HOME /Users/jonathan/.rvm/gems/ruby-2.1.2
GEM_PATH /Users/jonathan/.rvm/gems/ruby-2.1.2:/Users/jonathan/.rvm/gems/ruby-2.1.2@global
rubygems-bundler (1.4.4)


Gemfile
source 'https://rubygems.org'
source "https://www.mikeperham.com/rubygems/"

gem 'rails', '3.2.13'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'
gem 'em-resque', :git => 'git@github.com:jonhyman/em-resque.git'
gem 'aws-sdk'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'debugger'

gem 'analytics-ruby'


Gemfile.lock
GIT
  remote: git@github.com:jonhyman/em-resque.git
  revision: 8d604b40b871af14b3b30137c0fa15004bca544a
  specs:
    em-resque (1.1.0)
      em-hiredis (~> 0.1.0)
      em-synchrony (~> 1.0.0)
      resque (~> 1.2)

GEM
  remote: https://rubygems.org/
  remote: https://www.mikeperham.com/rubygems/
  specs:
    actionmailer (3.2.13)
      actionpack (= 3.2.13)
      mail (~> 2.5.3)
    actionpack (3.2.13)
      activemodel (= 3.2.13)
      activesupport (= 3.2.13)
      builder (~> 3.0.0)
      erubis (~> 2.7.0)
      journey (~> 1.0.4)
      rack (~> 1.4.5)
      rack-cache (~> 1.2)
      rack-test (~> 0.6.1)
      sprockets (~> 2.2.1)
    activemodel (3.2.13)
      activesupport (= 3.2.13)
      builder (~> 3.0.0)
    activerecord (3.2.13)
      activemodel (= 3.2.13)
      activesupport (= 3.2.13)
      arel (~> 3.0.2)
      tzinfo (~> 0.3.29)
    activeresource (3.2.13)
      activemodel (= 3.2.13)
      activesupport (= 3.2.13)
    activesupport (3.2.13)
      i18n (= 0.6.1)
      multi_json (~> 1.0)
    analytics-ruby (2.0.6)
    arel (3.0.3)
    aws-sdk (1.51.0)
      json (~> 1.4)
      nokogiri (>= 1.4.4)
    builder (3.0.4)
    coffee-rails (3.2.2)
      coffee-script (>= 2.2.0)
      railties (~> 3.2.0)
    coffee-script (2.3.0)
      coffee-script-source
      execjs
    coffee-script-source (1.7.1)
    em-hiredis (0.1.1)
      hiredis (~> 0.4.0)
    em-synchrony (1.0.3)
      eventmachine (>= 1.0.0.beta.1)
    erubis (2.7.0)
    eventmachine (1.0.3)
    execjs (2.2.1)
    hike (1.2.3)
    hiredis (0.4.5)
    i18n (0.6.1)
    journey (1.0.4)
    jquery-rails (3.1.1)
      railties (>= 3.0, < 5.0)
      thor (>= 0.14, < 2.0)
    json (1.8.1)
    mail (2.5.4)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    mime-types (1.25.1)
    mini_portile (0.6.0)
    mono_logger (1.1.0)
    multi_json (1.10.1)
    nokogiri (1.6.3.1)
      mini_portile (= 0.6.0)
    polyglot (0.3.5)
    rack (1.4.5)
    rack-cache (1.2)
      rack (>= 0.4)
    rack-protection (1.5.3)
      rack
    rack-ssl (1.3.4)
      rack
    rack-test (0.6.2)
      rack (>= 1.0)
    rails (3.2.13)
      actionmailer (= 3.2.13)
      actionpack (= 3.2.13)
      activerecord (= 3.2.13)
      activeresource (= 3.2.13)
      activesupport (= 3.2.13)
      bundler (~> 1.0)
      railties (= 3.2.13)
    railties (3.2.13)
      actionpack (= 3.2.13)
      activesupport (= 3.2.13)
      rack-ssl (~> 1.3.2)
      rake (>= 0.8.7)
      rdoc (~> 3.4)
      thor (>= 0.14.6, < 2.0)
    rake (10.3.2)
    rdoc (3.12.2)
      json (~> 1.4)
    redis (3.1.0)
    redis-namespace (1.5.1)
      redis (~> 3.0, >= 3.0.4)
    resque (1.25.2)
      mono_logger (~> 1.0)
      multi_json (~> 1.0)
      redis-namespace (~> 1.3)
      sinatra (>= 0.9.2)
      vegas (~> 0.1.2)
    sass (3.4.0)
    sass-rails (3.2.6)
      railties (~> 3.2.0)
      sass (>= 3.1.10)
      tilt (~> 1.3)
    sinatra (1.4.5)
      rack (~> 1.4)
      rack-protection (~> 1.4)
      tilt (~> 1.3, >= 1.3.4)
    sprockets (2.2.2)
      hike (~> 1.2)
      multi_json (~> 1.0)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    sqlite3 (1.3.9)
    thor (0.19.1)
    tilt (1.4.1)
    treetop (1.4.15)
      polyglot
      polyglot (>= 0.3.1)
    tzinfo (0.3.41)
    uglifier (2.5.3)
      execjs (>= 0.3.0)
      json (>= 1.8.0)
    vegas (0.1.11)
      rack (>= 1.0.0)

PLATFORMS
  ruby

DEPENDENCIES
  analytics-ruby
  aws-sdk
  coffee-rails (~> 3.2.1)
  em-resque!
  jquery-rails
  rails (= 3.2.13)
  sass-rails (~> 3.2.3)
  sqlite3
  uglifier (>= 1.0.3)

@indirect
Copy link
Member

Perfect, thanks. I'll look at this soon.

On Tue, Aug 19, 2014 at 3:03 PM, Jonathan Hyman notifications@github.com
wrote:

Okay, @indirect, I got it now.
I have a repro at https://github.com/jonhyman/bundler-3142. I created a Rails project with an out of date gem that is not pegged to a certain version. It looks like the bug is happening when I have a second source.

  1. git clone git@github.com:jonhyman/bundler-3142.git
  2. Run rails console in the directory, this will actually now fail because it's going to upgrade the analytics-ruby gem to a version that changed its filename so the require fails.
  3. Look at git status, the Gemfile.lock will have changed and upgraded the gem unexpectedly.
    image
    bundle env
Bundler 1.7.0
Ruby 2.1.2 (2014-05-08 patchlevel 95) [x86_64-darwin13.0]
Rubygems 2.2.2
rvm 1.25.28 (stable)
GEM_HOME /Users/jonathan/.rvm/gems/ruby-2.1.2
GEM_PATH /Users/jonathan/.rvm/gems/ruby-2.1.2:/Users/jonathan/.rvm/gems/ruby-2.1.2@global
rubygems-bundler (1.4.4)
Gemfile
source 'https://rubygems.org'
source "https://www.mikeperham.com/rubygems/"
gem 'rails', '3.2.13'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
gem 'em-resque', :git => 'git@github.com:jonhyman/em-resque.git'
gem 'aws-sdk'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby
  gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
gem 'analytics-ruby'
Gemfile.lock
GIT
  remote: git@github.com:jonhyman/em-resque.git
  revision: 8d604b40b871af14b3b30137c0fa15004bca544a
  specs:
    em-resque (1.1.0)
      em-hiredis (~> 0.1.0)
      em-synchrony (~> 1.0.0)
      resque (~> 1.2)
GEM
  remote: https://rubygems.org/
  remote: https://www.mikeperham.com/rubygems/
  specs:
    actionmailer (3.2.13)
      actionpack (= 3.2.13)
      mail (~> 2.5.3)
    actionpack (3.2.13)
      activemodel (= 3.2.13)
      activesupport (= 3.2.13)
      builder (~> 3.0.0)
      erubis (~> 2.7.0)
      journey (~> 1.0.4)
      rack (~> 1.4.5)
      rack-cache (~> 1.2)
      rack-test (~> 0.6.1)
      sprockets (~> 2.2.1)
    activemodel (3.2.13)
      activesupport (= 3.2.13)
      builder (~> 3.0.0)
    activerecord (3.2.13)
      activemodel (= 3.2.13)
      activesupport (= 3.2.13)
      arel (~> 3.0.2)
      tzinfo (~> 0.3.29)
    activeresource (3.2.13)
      activemodel (= 3.2.13)
      activesupport (= 3.2.13)
    activesupport (3.2.13)
      i18n (= 0.6.1)
      multi_json (~> 1.0)
    analytics-ruby (2.0.6)
    arel (3.0.3)
    aws-sdk (1.51.0)
      json (~> 1.4)
      nokogiri (>= 1.4.4)
    builder (3.0.4)
    coffee-rails (3.2.2)
      coffee-script (>= 2.2.0)
      railties (~> 3.2.0)
    coffee-script (2.3.0)
      coffee-script-source
      execjs
    coffee-script-source (1.7.1)
    em-hiredis (0.1.1)
      hiredis (~> 0.4.0)
    em-synchrony (1.0.3)
      eventmachine (>= 1.0.0.beta.1)
    erubis (2.7.0)
    eventmachine (1.0.3)
    execjs (2.2.1)
    hike (1.2.3)
    hiredis (0.4.5)
    i18n (0.6.1)
    journey (1.0.4)
    jquery-rails (3.1.1)
      railties (>= 3.0, < 5.0)
      thor (>= 0.14, < 2.0)
    json (1.8.1)
    mail (2.5.4)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    mime-types (1.25.1)
    mini_portile (0.6.0)
    mono_logger (1.1.0)
    multi_json (1.10.1)
    nokogiri (1.6.3.1)
      mini_portile (= 0.6.0)
    polyglot (0.3.5)
    rack (1.4.5)
    rack-cache (1.2)
      rack (>= 0.4)
    rack-protection (1.5.3)
      rack
    rack-ssl (1.3.4)
      rack
    rack-test (0.6.2)
      rack (>= 1.0)
    rails (3.2.13)
      actionmailer (= 3.2.13)
      actionpack (= 3.2.13)
      activerecord (= 3.2.13)
      activeresource (= 3.2.13)
      activesupport (= 3.2.13)
      bundler (~> 1.0)
      railties (= 3.2.13)
    railties (3.2.13)
      actionpack (= 3.2.13)
      activesupport (= 3.2.13)
      rack-ssl (~> 1.3.2)
      rake (>= 0.8.7)
      rdoc (~> 3.4)
      thor (>= 0.14.6, < 2.0)
    rake (10.3.2)
    rdoc (3.12.2)
      json (~> 1.4)
    redis (3.1.0)
    redis-namespace (1.5.1)
      redis (~> 3.0, >= 3.0.4)
    resque (1.25.2)
      mono_logger (~> 1.0)
      multi_json (~> 1.0)
      redis-namespace (~> 1.3)
      sinatra (>= 0.9.2)
      vegas (~> 0.1.2)
    sass (3.4.0)
    sass-rails (3.2.6)
      railties (~> 3.2.0)
      sass (>= 3.1.10)
      tilt (~> 1.3)
    sinatra (1.4.5)
      rack (~> 1.4)
      rack-protection (~> 1.4)
      tilt (~> 1.3, >= 1.3.4)
    sprockets (2.2.2)
      hike (~> 1.2)
      multi_json (~> 1.0)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    sqlite3 (1.3.9)
    thor (0.19.1)
    tilt (1.4.1)
    treetop (1.4.15)
      polyglot
      polyglot (>= 0.3.1)
    tzinfo (0.3.41)
    uglifier (2.5.3)
      execjs (>= 0.3.0)
      json (>= 1.8.0)
    vegas (0.1.11)
      rack (>= 1.0.0)
PLATFORMS
  ruby
DEPENDENCIES
  analytics-ruby
  aws-sdk
  coffee-rails (~> 3.2.1)
  em-resque!
  jquery-rails
  rails (= 3.2.13)
  sass-rails (~> 3.2.3)
  sqlite3
  uglifier (>= 1.0.3)

Reply to this email directly or view it on GitHub:
#3142 (comment)

@indirect
Copy link
Member

Thanks for the repro case! I'm happy to report that this is fixed in 1.7.1.pre.3. I'll be releasing 1.7.1 final a little later today.

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

5 participants