rvm / rvm1-ansible

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

Conditionally symlink Ruby related executables on the system path #211

Closed kotovalexarian closed 2 years ago

kotovalexarian commented 4 years ago

I've added variable rvm1_symlink_for_multi_user_install with default value True which indicates to symlink Ruby related executables on the system path for multi-user installations. This doesn't break backward compatibility because of it's default value.

TASK [rvm.ruby : Symlink ruby related binaries on the system path] *************
changed: [articles.crypto-libertarian.com] => (item=erb)
changed: [articles.crypto-libertarian.com] => (item=executable-hooks-uninstaller)
changed: [articles.crypto-libertarian.com] => (item=gem)
changed: [articles.crypto-libertarian.com] => (item=irb)
changed: [articles.crypto-libertarian.com] => (item=rake)
changed: [articles.crypto-libertarian.com] => (item=rdoc)
changed: [articles.crypto-libertarian.com] => (item=ri)
changed: [articles.crypto-libertarian.com] => (item=ruby)

P.S. Found similar PR: #94. However, it haven't been merged since 2016 for some reason.

pkuczynski commented 2 years ago

@sfgeorge @danochoa what do you think about this change?

sfgeorge commented 2 years ago

This seems reasonable to me. I agree that with its default value for rvm1_symlink_for_multi_user_install: True it maintains existing functionality.

I can see this being potentially useful in a situation where some of your applications are still using a system-provided Ruby, and you don't immediately want to have the RVM-installed binaries taking precedence on $PATH just yet.

sfgeorge commented 2 years ago

Oh whoops. On second thought . . .

  1. 94 and #211 are duplicitous of each other.

  2. Personally, I like that #94 also prevents bundle & bundler binaries from being linked. It would be odd to have those link while all other binaries are not.
pkuczynski commented 2 years ago

@sfgeorge #94 is merged, so I am closing this one, right? Let me know if I should reopen...

sfgeorge commented 2 years ago

@pkuczynski I agree, thanks very much. 👍

@kotovalexarian Thank you for the great idea! We had it in another PR and we just happened to go with that one.