rvm / rvm1-ansible

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

Allow specifying bundler version #197

Closed ryanpineo closed 4 years ago

ryanpineo commented 5 years ago

Backwards compatible so users that do not use the new version variable will experience no change.

ryanpineo commented 5 years ago

One thing I noticed while creating this is it may be useful to define a way that allows specifying the bundler version per ruby version. perhaps something like

rvm1_rubies:
  - ruby: 'ruby-1.9.3'
    bundler: '~>1.7.0'
  - ruby: 'ruby-2.2.5'
    bundler: '~>2.0.0'
  - ruby: 'ruby-2.3.1'
henare commented 5 years ago

We're using this but something that tripped me up is that by default RVM installs Bundler. That means that the Install bundler if not installed task never runs. I added --without-gems="bundler" to our rvm1_install_flags and it's working as expected.

I'm not sure how we could generalise this to make this PR work for everyone though. Maybe the simple thing is just to document needing to add that flag next to where this functionality is documented in the README?

thbar commented 4 years ago

@ryanpineo thanks for the PR! For now, we will close this one, because after experimenting a bit more, we want to cover more flexibility.

You can add your feedback to #217 which we'll use as a basis to design a more complete solution.

Thank you anyway for your PR, which has helped the project move forward!