Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using Mountain Lion. I've installed Ruby first with RVM, then with rbenv. I can assure it's running the latest one with which ruby, it correctly points to the one installed with rbenv.

gem won't install any gem, it always throws me the same error (not always in the same file, but the same error with split:

Users/Macbook/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:1357:in `split': invalid byte sequence in UTF-8 (ArgumentError)
    from /Users/Macbook/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:1357:in `find_executable0'
    from /Users/Macbook/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:1564:in `pkg_config'
    from extconf.rb:15:in `<main>'

I've tried setting these exports in my .profile, without luck:

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

I've also updated bash with brew, and activated it with chsh. iTerm2 is correctly configurated with UTF-8 encoding too.

I have no idea what else to do now. I have XCode 4.6.3.

share|improve this question
Did you try using rbenv instead of rvm? I 've also had some issues using rvm but none so far using rbenv –  jmoreira Oct 15 '13 at 12:48
Yes, same results. –  Cristian Oct 16 '13 at 13:30
add comment

1 Answer

up vote 0 down vote accepted

The problem was solved cleaning up all files related with the setting up of the PATHenvironment variable (.bash_profile, .profile, .bashrc) and then installing rvmagain. Executing an echo $PATHrevealed a strange character which broke bundler's processing of the PATH.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.