Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rvm and ruby 2.0 error #161

Closed
error400 opened this issue Apr 25, 2013 · 14 comments
Closed

rvm and ruby 2.0 error #161

error400 opened this issue Apr 25, 2013 · 14 comments

Comments

@error400
Copy link

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?

@sheldond
Copy link

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.

@sheldond
Copy link

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

@gs
Copy link
Collaborator

gs commented Jun 14, 2013

Hey,

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?

@sheldond
Copy link

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

@jackchang
Copy link

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
Copy link

sheldond commented Jul 5, 2013

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

@gja
Copy link
Collaborator

gja commented Jul 6, 2013

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

@gastonmorixe
Copy link

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

@jackchang
Copy link

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}'",

to

"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

@gastonmorixe
Copy link

@jackchang Thank you!

@trafnar
Copy link

trafnar commented Sep 6, 2013

@jackchang awesome, worked for me!

@gs gs closed this as completed Oct 7, 2013
@sergio101
Copy link

thanks! the above worked for me too..

@stevenchanin
Copy link

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.

@liam-ngy
Copy link

@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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants