Application 2018-12-04

Encountered Path Issues When Installing Bundler with rbenv via anyenv

Fix Bundler /usr/local/bin path issue with rbenv and anyenv by running rbenv exec gem install command.

Read in: ja
Encountered Path Issues When Installing Bundler with rbenv via anyenv

Overview

A discussion on the path issues encountered when installing bundler with rbenv installed via anyenv.

The Issue

I installed rbenv using anyenv to use Ruby, but when I installed bundler with the command:

gem install bundler

without much thought, bundler ended up being placed under /usr/local/bin/.

Since this was not the intended path, attempts to use gems like chef would fail.

Solution

rbenv exec gem install bundler

Specify to execute the gem with the Ruby introduced by rbenv.

Thoughts

If I had calmly checked the path, I would have realized it quickly, even if I was not familiar with Ruby...

References

Tags: anyenv gem rbenv Ruby Tips
Share: 𝕏 Post Facebook Hatena
✏️ View source / Discuss on GitHub
☕ Support

If you enjoy this blog, consider supporting it. Every bit helps keep it running!


Related Articles