rbenv-gemset icon indicating copy to clipboard operation
rbenv-gemset copied to clipboard

Using the plugin in an existing project

Open amitavmohanty01 opened this issue 7 years ago • 5 comments

In an setup where rbenv is installed and gems are installed too, what are the steps to activate the plugin without re-installing the gems?

amitavmohanty01 avatar May 11 '17 21:05 amitavmohanty01

It sounds like you were previously just using rbenv without gemsets, but now you want to try out rbenv-gemset?

rbenv-gemset wasn't designed for this, fyi. If you want to, you can try copying (or symlinking) the gem directories to the appropriate directory at ~/.rbenv/versions/<rbenv version name>/gemsets/<gemset name>/gems

jf avatar May 27 '17 15:05 jf

You read the use case correctly. The workaround sounds fine. I shall try it. What do you think about extending rbenv-gemset to encompass the use case? It might be a just a script that performs the symlinking as you mentioned to start with.

amitavmohanty01 avatar Jun 15 '17 08:06 amitavmohanty01

This isn't a very common use case that I know of, and there are implications for officially "supporting" it, so I'm not so keen on this. You're free to try and let me know how it goes though.

jf avatar Jun 15 '17 14:06 jf

Seems we are automatically fall to "previously just using rbenv without gemsets" if using with rbenv-default-gems.

tangrufus avatar Sep 10 '17 00:09 tangrufus

Just ran into the same issue, I fixed it using bundler

bundle install --redownload

It will reinstall all gems and put the gems in the correct dir (i.e. gemset dir).

EDIT: I know OP said "without re-installing the gems", but maybe someone else finds this question and is fine with re-installing.

0llirocks avatar Oct 18 '23 08:10 0llirocks