greendog-rails-template icon indicating copy to clipboard operation
greendog-rails-template copied to clipboard

rvm partial bug

Open afhammad opened this issue 14 years ago • 1 comments

the following line does not work.

rvm_list = 'rvm list'.gsub(Regexp.new("\e[.?.?.?m"), '')

/web/temp/partials/_rvm.rb:8:in apply': undefined method[]' for nil:NilClass (NoMethodError)

afhammad avatar Sep 20 '11 19:09 afhammad

I've tried to reproduce your error but have not been able to. Try running the command from irb and see if it works:

$ irb
>> rvm_list = `rvm list`.gsub(Regexp.new("\e\\[.?.?.?m"), '')
=> "\nrvm rubies\n\n=> ruby-1.9.2-p290\e(B [ x86_64 ]\n\n"

Also, it's completely safe to remove this line from the _rvm.rb partial if you do not have export rvm_pretty_print_flag=1 in your .rvmrc file.

greendog99 avatar Sep 24 '11 01:09 greendog99