rvm and ruby 2.0 error #161

error400 opened this Issue Apr 25, 2013 · 14 comments


None yet
10 participants

If i want to execute a test i get the following error:

~/.rvm/rubies/ruby-2.0.0-p0/bin/ruby:1: invalid multibyte char (UTF-8)
[Finished in 0.2s with exit code 1]

any Suggestions?

This is not limited to Ruby 2.0, I'm receiving something very similar:

/Users/sheldon/.rvm/rubies/ruby-1.9.3-p429/bin/ruby:1: invalid multibyte char (US-ASCII)
[Finished in 0.3s with exit code 1]

This is with "check_for_rvm": true, if I set "check_for_rvm": false then I don't get this error but then the system Ruby is used, which doesn't work for me.

I've tried putting # encoding: utf-8 at the top of the file but this does not fix it.

I've also tried starting ST2 from the command line with subl . and this does not fix the issue either.

Just checking in, I'd love to use this plugin, anyone got any ideas?


gs commented Jun 14, 2013


I have a project ruby 2 + rails 4 and have no problems with running plugin - but I'm using chruby.

When you run the tests from command line then all works?

Yes the tests run totally normally from the command line :)

I also ran into the same issue
/Users/Jack/.rvm/rubies/ruby-1.9.3-p448/bin/ruby:1: invalid multibyte char (US-ASCII)
Have you solved the problem yet? Thanks

sheldond commented Jul 5, 2013

No I haven't, I will just stick to the console :)


gja commented Jul 6, 2013

Could someone paste a stack trace please? You can get it from opening the ctrl-` console.

gaston23 commented Jul 7, 2013

Exactly same problem here.

/Users/gaston/.rvm/rubies/ruby-1.9.3-p429/bin/ruby:1: invalid multibyte char (US-ASCII)
[Finished in 0.3s with exit code 1]

Running /Users/gaston/.rvm/bin/rvm-auto-ruby -S ruby -Itest test/unit/payment_test.rb
reloading /Users/gaston/Library/Application Support/Sublime Text 2/Packages/User/RubyTest.last-run
Writing file /Users/gaston/Sites/XXXX/test/unit/payment_test.rb with encoding UTF-8

It works for me after I changed the lines in RubyTest.sublime-settings:

"run_ruby_unit_command": "ruby -Itest {relative_path}",
"run_single_ruby_unit_command": "ruby -Itest {relative_path} -n '{test_name}'",


"run_ruby_unit_command": "-Itest {relative_path}",
"run_single_ruby_unit_command": "-Itest {relative_path} -n '{test_name}'",

After the change (using example from the above post)
/Users/gaston/.rvm/bin/rvm-auto-ruby -S ruby -Itest test/unit/payment_test.rb
now should run
/Users/gaston/.rvm/bin/rvm-auto-ruby -S -Itest test/unit/payment_test.rb

@jackchang Thank you!

trafnar commented Sep 6, 2013

@jackchang awesome, worked for me!

gs closed this Oct 7, 2013

thanks! the above worked for me too..

I started seeing this problem after I upgraded to Yosemite (OSX 10.10).

At first, I was getting a problem about a mis-match in ruby version in Bunder's validate_ruby! method. Then changed the setting "check_for_rvm" to true. At that point, my ruby version mis-match disappeared, but this started to happen. I used @jackchang 's approach and it started working.

@jackchang thanks. but I have a problem if I use bundle it says:
bundler: command not found: -Itest
Install missing gem executables with bundle install

Any solutions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment