How do I replicate a failing command?

I'm attempting to allow RubyMine Gem Manager to install gems after a clean install of rvm (rm -rf ~/.rvm; curl -L | bash -s stable --rails), but it's failing:

/Users/paulm/.rvm/rubies/ruby-1.9.3-p194/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/paulm/.rvm/gems/ruby-1.9.3-p194@global/bin/bundle install

Fetching gem metadata from

Installing system_timer (1.2.4) with native extensions

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /Users/paulm/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb

creating Makefile


compiling system_timer_native.c

make: gcc-4.2: No such file or directory

make: *** [system_timer_native.o] Error 1

Gem files will remain installed in /Users/paulm/.rvm/gems/ruby-1.9.3-p194@project-api/gems/system_timer-1.2.4 for inspection.

Results logged to /Users/paulm/.rvm/gems/ruby-1.9.3-p194@project-api/gems/system_timer-1.2.4/ext/system_timer/gem_make.out

An error occured while installing system_timer (1.2.4), and Bundler cannot continue.

Make sure that `gem install system_timer -v '1.2.4'` succeeds before bundling.

Process finished with exit code 5

If I paste that command on the command line in the project directory, it works,

$ /Users/paulm/.rvm/rubies/ruby-1.9.3-p194/bin/ruby -e '$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)' /Users/paulm/.rvm/gems/ruby-1.9.3-p194@global/bin/bundle install
Fetching gem metadata from
Using rake (
Installing i18n (0.6.0)

`rvm info` shows the same gemset as revealed in Preferences > Ruby SDK & Gems.

I don't know if this is relevant but here is my Gemfile,

source ''

require 'net/http'
require 'net/https'
require 'uri'

gem 'rails', '3.2.8'
gem 'mysql2'

gem "rabl"

gem 'google4r-checkout'

group :development, :test do
  gem "railroady"
  gem "rdoc"
  gem "rspec-rails"

Two puzzling aspects: what is installing system_timer (this is redundant under 1.9 AFAIK), and how can I replicate what RubyMine is doing to debug?

Please sign in to leave a comment.