jeroenvandijk / rails_test_box

A Vagrant/Chef script to set up a VirtualBox ready to run the complete Rails Test Suite
44 stars 2 forks source link

Perhaps incompatible with latest rvm version? #13

Closed rud closed 14 years ago

rud commented 14 years ago

Running @bundle exec vagrant up@ from a clean checkout of revision 31797b93.

The install goes well for a while, before dying with the following error. Any ideas?

[INFO 05-24-2010 15:52:15] Vagrant: [Mon, 24 May 2010 06:52:15 -0700] INFO: Ran execute[set ruby ruby-1.8.7-p249 as default] successfully
: stdout
[INFO 05-24-2010 15:52:16] Vagrant: [Mon, 24 May 2010 06:52:16 -0700] ERROR: ruby_block[/home/vagrant/.rvm/bin/rvm use ruby-1.8.7-p249] (/tmp/vagrant-chef/cookbooks-0/rvm/definitions/rvm_use.rb line 7) had an error:
can't convert nil into String
/tmp/vagrant-chef/cookbooks-0/rvm/definitions/rvm_use.rb:17:in `[]='
/tmp/vagrant-chef/cookbooks-0/rvm/definitions/rvm_use.rb:17:in `from_file'
/tmp/vagrant-chef/cookbooks-0/rvm/definitions/rvm_use.rb:15:in `each_line'
/tmp/vagrant-chef/cookbooks-0/rvm/definitions/rvm_use.rb:15:in `from_file'
/usr/lib/ruby/gems/1.8/gems/chef-0.8.6/bin/../lib/chef/mixin/command.rb:379:in `[]'
/usr/lib/ruby/gems/1.8/gems/chef-0.8.6/bin/../lib/chef/mixin/command.rb:379:in `popen4'
/tmp/vagrant-chef/cookbooks-0/rvm/definitions/rvm_use.rb:9:in `from_file'
jeroenvandijk commented 14 years ago

Hi Rud,

Thanks for reporting this. Something has indeed changed and I will push a simple fix for this shortly. Seems to be an empty line in the RVM output that causes this nil error.

Thanks,

Jeroen

jeroenvandijk commented 14 years ago

Make rvm_use definition more robust by ignoring empty lines. Closed by 9a6ddc52b3c5ec48dc9c588a2e3f209ba564fe9c