Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

environment_manager_load_string not understood by rbenv #1

Open
guikubivan opened this issue May 18, 2016 · 3 comments
Open

environment_manager_load_string not understood by rbenv #1

guikubivan opened this issue May 18, 2016 · 3 comments

Comments

@guikubivan
Copy link

Hey! It's great you made this into a public gem!

I had a problem with RubyVersionReader#environment_manager_load_string returning a format that's not supported by rbenv (or at least it didn't in my machine running rbenv 1.0.0). The environment_manager_load_string returns something like "RBENV_VERSION=ruby-X.Y.Z-pXXX@mygemset". There are two issues with this:

  1. Rbenv does not support gemsets by default, but there are plugins for it. You'd need to specify which plugin this works with or just not include the gemset.
  2. Rbenv references ruby versions just by their version number, e.g. "X.Y.Z-pXXX". No need to include the "ruby-" prefix.
@metavida
Copy link
Owner

Hey @guikubivan, fancy meeting you here 😄

That's excellent to know Re: rbenv. The code I wrote to handle various ruby environment managers is super rudimentary. Best-case scenario it seems like this library should probably contain sub-classes for various engines, each of which handle the #to_s method appropriately.

Rbenv references ruby versions just by their version number, e.g. "X.Y.Z-pXXX". No need to include the "ruby-" prefix.

Does the presence of the "ruby-" prefix actually break rbenv or is it simply a redundant/unnecessary prefix?

@metavida
Copy link
Owner

Oh, also, I'm not sure how much time I'll have to work on this in the short-term. Any chance you could make a pull request? 😛

@guikubivan
Copy link
Author

Re "ruby-" prefix: rbenv barfs at it.

I would make a PR if I knew how to fix it because the plot thickens, turns out rbenv cannot switch out of the current ruby when inside a ruby process. See rbenv/rbenv#121

I have a hack in place , but that only works with exporting the variable(my hack) or creating a wrapper to Bundler.with_clean_env. For now, I think I'll just use my hack locally for theme development 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants