rvm / rvm1-ansible

The official ansible RVM role to install and manage your Ruby versions.
MIT License
271 stars 136 forks source link

Fix Bundler installation shell command when rvm1_rubies is not the latest version #59

Closed hsamadi closed 8 years ago

nickjj commented 9 years ago

Thanks for this. This bug was introduced in a different PR. Would you be willing to add a test to https://github.com/rvm/rvm1-ansible/blob/master/.travis.yml#L15 so that in the future we can be confident that bundler gets installed when requested?

hsamadi commented 9 years ago

Yeah sure. I'll do that ASAP.

blelump commented 8 years ago

This change crashes if there're more rubies installed, eg:

$ rvm list strings | grep ruby-2.0.0
ruby-2.0.0-p451
ruby-2.0.0-p643

results in "stdout": "ruby-2.0.0-p451\nruby-2.0.0-p643" . Notice the second task invokes {{ rvm1_install_path }}/wrappers/{{ item.stdout }}/gem list.

I've updated first shell with:

      shell: >
        {{ rvm1_rvm }} list strings | grep {{ item }} | tail -n 1

so it returns the newest patch.

koos303 commented 8 years ago

I've created another PR: https://github.com/rvm/rvm1-ansible/pull/76

This also commits @blelump 's fix and checks if bundler is really installed, e.g. it is not only installed into the global gemset directory.

I've also added a test for running on Travis and removed sudo, because they are running on docker containers now.

Please let me know if this works for you.

nickjj commented 8 years ago

Fixed on master thanks to https://github.com/rvm/rvm1-ansible/pull/76.

blelump commented 8 years ago

@koos303 , great, thanks!