rbenv icon indicating copy to clipboard operation
rbenv copied to clipboard

Purpose of handler

Open leonelgalan opened this issue 9 years ago • 4 comments

What's the purpose of rehash rbenv? Rehash is called manually from tasks/main.yml:151 or tasks/main.yml:182

It it notifies the handler instead, we could install gems (env: system so now default gems plugin available) and rbenv rehash would happen at the very end.

leonelgalan avatar Jan 29 '15 21:01 leonelgalan

@leonelgalan this issue is actual now?

zzet avatar Feb 24 '15 12:02 zzet

Yeah, but I discovered that handlers are only "triggered" at the end of the playbook's run. So if we install bundler, we need to manually rbenv rehash in order to have bundle available before the playbook finishes.

I wish there was a handler-like task that could be triggered at the end of the recipe's run or manually for DRYness. So it's might be a non-issue.

leonelgalan avatar Feb 25 '15 18:02 leonelgalan

I have nothing against to run rehash immediately after installation bundler. I think it is a true way.

zzet avatar Feb 25 '15 18:02 zzet

If you think that should be divided rbenv global {{rbenv.ruby_version}} & rbenv renash - I think that this can be done. Essentially it will not change, but it will be obvious.

zzet avatar Feb 25 '15 18:02 zzet