Error with rubygems after upgrade to 1.8.25

firegoblin21's Avatar


28 Jan, 2013 09:10 PM

I just updated to rubygems 1.8.25 after pushing to heroku said that ZenTest 4.8.3 required RubyGems version ~> 1.8. Afterwards I get an error gem -v or any other gem command:

/Applications/rubystack-1.9.3-1/rvm/rubies/ruby-1.9.3-p194/bin/gem: line 13: syntax error near unexpected token `Gem::QuickLoader'
/Applications/rubystack-1.9.3-1/rvm/rubies/ruby-1.9.3-p194/bin/gem: line 13: `if RUBY_VERSION =~ /^1\.9\.1/ && defined?(Gem::QuickLoader)'

I've tried changing to other rubygem versions and they seem to just give different errors in that file> Below is the file with a comment line next to the offending line 13:

# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.

# The prelude in 1.9.1 injects rubygems.rb into $LOADED_FEATURES
# which prevents the `require 'rubygems'` from actually loading
# the site's version of rubygems. So we have to use it's API
# to get it's prelude out of the way.
if RUBY_VERSION =~ /^1\.9\.1/ && defined?(Gem::QuickLoader)             #LINE 13

require 'rubygems'
require 'rubygems/gem_runner'
require 'rubygems/exceptions'

required_version = ">= 1.8.7"

unless required_version.satisfied_by? Gem.ruby_version then
  abort "Expected Ruby Version #{required_version}, is #{Gem.ruby_version}"

args = ARGV.clone

begin args
rescue Gem::SystemExitException => e
  exit e.exit_code
  1. Support Staff 1 Posted by Nick Quaranto on 20 Feb, 2013 01:21 AM

    Nick Quaranto's Avatar

    I'd post this to StackOverflow. This help site is for issues with only.

  2. Nick Quaranto closed this discussion on 20 Feb, 2013 01:21 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac