Bundler::RubyVersionMismatch with subshell processes

170 views
Skip to first unread message

Brian McManus

unread,
Mar 18, 2013, 1:11:22 PM3/18/13
to rubyversi...@googlegroups.com
Hi all,

I'm hitting a problem and not entirely sure which end it's even on.  I'm using the latest rvm and the latest bundler.  My Gemfile specifies 'ruby 2.0.0' for heroku.

I'm using a few unrelated gems that are hitting the same problem in my environment though and it seems to have something to do with them trying to exec a cmd in a subshell.  The gems I've seen hit this problem so far are airbrake and paratrooper (a heroku deployment helper).

The error that ultimately shows up is:

/Users/bmcmanus/.rvm/gems/ruby-2.0.0-p0@cmweb/gems/bundler-1.3.4/lib/bundler/definition.rb:361:in `validate_ruby!': Your Ruby version is 1.9.3, but your Gemfile specified 2.0.0 (Bundler::RubyVersionMismatch)

My .rvmrc file is totally unmodified with just the ruby/gemset specified as environment_id="2.0.0-p0@cmweb".

Everything else I do works fine (tests/heroku cmds/etc).  It only seems to happen when some ruby code tries to `run some command`.

I've done `rvm get head`, gem update system, and gem update bundler (running 1.3.4).

`rvm info` gives:

bmcmanus@bdmac:~/code/cmweb(master)$ rvm info
ruby-2.0.0-p0@cmweb:
  system:
    uname:       "Darwin bdmac.local 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64"
    system:      "osx/10.8/x86_64"
    bash:        "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin12)"
    zsh:         "/bin/zsh => zsh 4.3.11 (i386-apple-darwin12.0)"
  rvm:
    version:      "rvm 1.18.21 (master) by Wayne E. Seguin <[redacted]@gmail.com>, Michal Papis <[redacted]@gmail.com> [https://rvm.io/]"
    updated:      "10 minutes 18 seconds ago"
  ruby:
    interpreter:  "ruby"
    version:      "2.0.0p0"
    date:         "2013-02-24"
    platform:     "x86_64-darwin12.2.0"
    patchlevel:   "2013-02-24 revision 39474"
    full_version: "ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.2.0]"
  homes:
    gem:          "/Users/bmcmanus/.rvm/gems/ruby-2.0.0-p0@cmweb"
    ruby:         "/Users/bmcmanus/.rvm/rubies/ruby-2.0.0-p0"
  binaries:
    ruby:         "/Users/bmcmanus/.rvm/rubies/ruby-2.0.0-p0/bin/ruby"
    irb:          "/Users/bmcmanus/.rvm/rubies/ruby-2.0.0-p0/bin/irb"
    gem:          "/Users/bmcmanus/.rvm/rubies/ruby-2.0.0-p0/bin/gem"
    rake:         "/Users/bmcmanus/.rvm/gems/ruby-2.0.0-p0@global/bin/rake"
  environment:
    PATH:         "/Users/bmcmanus/.rvm/gems/ruby-2.0.0-p0@cmweb/bin:/Users/bmcmanus/.rvm/gems/ruby-2.0.0-p0@global/bin:/Users/bmcmanus/.rvm/rubies/ruby-2.0.0-p0/bin:/Users/bmcmanus/.rvm/bin:/Users/bmcmanus/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin"
    GEM_HOME:     "/Users/bmcmanus/.rvm/gems/ruby-2.0.0-p0@cmweb"
    GEM_PATH:     "/Users/bmcmanus/.rvm/gems/ruby-2.0.0-p0@cmweb:/Users/bmcmanus/.rvm/gems/ruby-2.0.0-p0@global"
    MY_RUBY_HOME: "/Users/bmcmanus/.rvm/rubies/ruby-2.0.0-p0"
    IRBRC:        "/Users/bmcmanus/.rvm/rubies/ruby-2.0.0-p0/.irbrc"
    RUBYOPT:      ""
    gemset:       "cmweb"

I have ruby 1.9.3 specified as my rvm default ruby which is what the error message from bundler is saying my ruby version is so I suspect if I changed my system default rvm ruby to 2.0.0-p0 the errors would magically go away but that seems like it should not be necessary.

mpapis

unread,
Mar 19, 2013, 1:53:36 PM3/19/13
to rubyversi...@googlegroups.com
check:

- which bundle
- gem env

Brian McManus

unread,
Mar 19, 2013, 2:06:16 PM3/19/13
to rubyversi...@googlegroups.com
bmcmanus@bdmac:~/code/cmweb(master*)$ which bundle

Below is the output.  Nothing obviously wrong to me.

/Users/bmcmanus/.rvm/gems/ruby-2.0.0-p0@cmweb/bin/bundle

bmcmanus@bdmac:~/code/cmweb(master*)$ gem env

RubyGems Environment:
  - RUBYGEMS VERSION: 2.0.3
  - RUBY VERSION: 2.0.0 (2013-02-24 patchlevel 0) [x86_64-darwin12.2.0]
  - INSTALLATION DIRECTORY: /Users/bmcmanus/.rvm/gems/ruby-2.0.0-p0@cmweb
  - RUBY EXECUTABLE: /Users/bmcmanus/.rvm/rubies/ruby-2.0.0-p0/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/bmcmanus/.rvm/gems/ruby-2.0.0-p0@cmweb/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-12
  - GEM PATHS:
     - /Users/bmcmanus/.rvm/gems/ruby-2.0.0-p0@cmweb
     - /Users/bmcmanus/.rvm/gems/ruby-2.0.0-p0@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
     - :benchmark => false
     - "gem" => "--no-ri --no-rdoc"
     - :sources => ["http://rubygems.org"]
  - REMOTE SOURCES:
Reply all
Reply to author
Forward
0 new messages