-
Notifications
You must be signed in to change notification settings - Fork 13
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
Thoughts on chruby? #22
Comments
I haven't looked at it too much, but it looks like it also tries to be minimal. It's implemented as a shell function, so it can directly modify your environment (unlike ry, which is implemented in shell as a single executable). This makes it shell-dependent, which is usually OK for most people. It also seems to require But it seems to work well for a lot of folks :). Were you curious about anything else specifically? |
I wanted to discuss this as well to know your thoughts. The idea of being a shell function and using PATH has the nice property to be able to rehash and causes less trouble than changing a symlink (across terminals which can be badly hashed) but it is also less robust (it messes with the environment) and of course does not modify globally the ruby version (in many cases I find it useful but in some other cases not, having both abilities would be nice). I tried chruby, but it did not stay a day. First, it completely messes things if you happen to have two rubies with the same RUBY_VERSION and engine, or one which does not support the introspection code to set the gem location. Forcing gem location does not seem good or minimal to me and it just brought segfaults as I had two rubies 2.0. That introspection makes ruby switching not fast for jruby and like, and installs a very dangerous environment if that code fails. It is also pretty painful to use existing gem prefix. Rubinius definitely needs some trick to have its gem binaries in path. This might be done by the version manager, even if not ideal. I think I'll have a pull request for that soon. |
It'd be easy enough to modify ry to optionally be a shell function, as
On 01/18, Benoit Daloze wrote:
|
I also still prefer ry, I have tried out all kind of different stuff. But none are as lightweight with the ability to just set the PATH without having to run any shell-scripts. Especially if you are using some other shell (fish-shell in my case) that is not POSIX compatible. I'm running multiple rubies at the same time, but only in pow right now, where I'm overriding the PATH in the .powenv with corresponding version. |
I'd be very interesting in seeing a comprehensive analysis of both solutions, how each works and the consequences of those differences. I am torn between the two, but don't have much to go in so far as making a choice either way. |
Quick thought: for servers, it seems changing the ruby globally is not suitable, so |
For production deployment, I generally recommend going with raw |
@jneen, agreed. i has servers requiring a multi-rubies environment, so using ansible with ry to my pleasure as i don't have much dependenices to resolve. |
Have you looked at chruby by postmodern?
I was wondering what your thoughts are on it and how it compares to ry.
The text was updated successfully, but these errors were encountered: