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

Suport prefix matching on ruby versons. #276

Closed
sheerun opened this Issue Feb 4, 2013 · 13 comments

Comments

Projects
None yet
7 participants
@sheerun
Contributor

sheerun commented Feb 4, 2013

I want to type rbenv install 1.9.3 and newest version of ruby 1.9.3 should be installed.

The general pattern is:

rbenv install 1.9       # installs 1.9.3-p374 (newest stable 1.9 one)
rbenv install 1.9.2     # installs 1.9.2-p320 (newest stable 1.9.2 one)
rbenv install jruby-1.7 # installs jruby-1.7.2 (newest stable jruby-1.7)
rbenv install maglev    # installs maglev-1.0.0 (newest stable maglev)
rbenv install ree       # installs ree-1.8.7-2012.02 (guess why)

PLEASE safe me copying and pasting, and approve this feature. Rbenv is not just for server.

@sheerun

This comment has been minimized.

Show comment
Hide comment
@sheerun

sheerun Feb 4, 2013

Contributor

Also, cancel installation if ruby version with provided prefix has been installed before.

Contributor

sheerun commented Feb 4, 2013

Also, cancel installation if ruby version with provided prefix has been installed before.

@nihilismus

This comment has been minimized.

Show comment
Hide comment
@nihilismus

nihilismus Feb 6, 2013

Sounds like rbenv/rbenv/issues/328 "Support for abbreviated ruby version in .ruby-version file"

nihilismus commented Feb 6, 2013

Sounds like rbenv/rbenv/issues/328 "Support for abbreviated ruby version in .ruby-version file"

@sheerun

This comment has been minimized.

Show comment
Hide comment
@sheerun

sheerun Feb 6, 2013

Contributor

I may understand why rbenv should not support that similar feature, but I don't know why ruby-build shouldn't this one.

Contributor

sheerun commented Feb 6, 2013

I may understand why rbenv should not support that similar feature, but I don't know why ruby-build shouldn't this one.

@bensie

This comment has been minimized.

Show comment
Hide comment
@bensie

bensie Feb 6, 2013

Contributor

The only job of ruby-build is to install rubies. Keeps it dead simple. It doesn't know or care about what is the latest, and certainly doesn't determine any level of stability for a given major version (prerelease vs rc vs official release).

Contributor

bensie commented Feb 6, 2013

The only job of ruby-build is to install rubies. Keeps it dead simple. It doesn't know or care about what is the latest, and certainly doesn't determine any level of stability for a given major version (prerelease vs rc vs official release).

@fschwahn

This comment has been minimized.

Show comment
Hide comment
@fschwahn

fschwahn Feb 6, 2013

I think the same argument which is being made for rbenv holds here. You can avoid copy/pasting by using the shell completion rbenv-install provides.

fschwahn commented Feb 6, 2013

I think the same argument which is being made for rbenv holds here. You can avoid copy/pasting by using the shell completion rbenv-install provides.

@nixpulvis

This comment has been minimized.

Show comment
Hide comment
@nixpulvis

nixpulvis Feb 9, 2013

I'm currently using rbenv to bootstrap fresh computers with needed tools, being able to write something like rbenv install 1.9.3 or even rbenv install stable would be very nice, to avoid having to update my script everytime ruby is updated.

nixpulvis commented Feb 9, 2013

I'm currently using rbenv to bootstrap fresh computers with needed tools, being able to write something like rbenv install 1.9.3 or even rbenv install stable would be very nice, to avoid having to update my script everytime ruby is updated.

@jeremy

This comment has been minimized.

Show comment
Hide comment
@jeremy

jeremy Feb 10, 2013

Member

You could use ruby-build --definitions | grep 1.9.3-p[0-9] | tail -1 in your build script to grab the latest 1.9.3 patchlevel.

Member

jeremy commented Feb 10, 2013

You could use ruby-build --definitions | grep 1.9.3-p[0-9] | tail -1 in your build script to grab the latest 1.9.3 patchlevel.

@nixpulvis

This comment has been minimized.

Show comment
Hide comment
@nixpulvis

nixpulvis Feb 10, 2013

yea, I just think this kind of logic belongs in the script that is managing ruby versions already.

nixpulvis commented Feb 10, 2013

yea, I just think this kind of logic belongs in the script that is managing ruby versions already.

@jeremy

This comment has been minimized.

Show comment
Hide comment
@jeremy

jeremy Feb 10, 2013

Member

That's just the thing: ruby-build is version agnostic. From its point of view, these are arbitrary identifiers associated with a build definition. It doesn't distinguish later versions from earlier, or know about the difference between a release, preview/rc, and dev versions.

Member

jeremy commented Feb 10, 2013

That's just the thing: ruby-build is version agnostic. From its point of view, these are arbitrary identifiers associated with a build definition. It doesn't distinguish later versions from earlier, or know about the difference between a release, preview/rc, and dev versions.

@nixpulvis

This comment has been minimized.

Show comment
Hide comment
@nixpulvis

nixpulvis Feb 10, 2013

I guess keeping ruby-build completely version agnostic is worth the extra hassle, I'll quit being lazy.

nixpulvis commented Feb 10, 2013

I guess keeping ruby-build completely version agnostic is worth the extra hassle, I'll quit being lazy.

@jeremy jeremy closed this Feb 10, 2013

@sferik

This comment has been minimized.

Show comment
Hide comment
@sferik

sferik Feb 10, 2013

Contributor

@nathan You might be happier using chruby with ruby-build (instead of rbenv).

I agree with @jeremy that this feature is outside the scope of ruby-build.

Contributor

sferik commented Feb 10, 2013

@nathan You might be happier using chruby with ruby-build (instead of rbenv).

I agree with @jeremy that this feature is outside the scope of ruby-build.

@nixpulvis

This comment has been minimized.

Show comment
Hide comment
@nixpulvis

nixpulvis Feb 10, 2013

It's not worth switching away from rbenv just for this. I'm just going to implement a little logic to get the current stable version for my build script. Not a huge deal.

nixpulvis commented Feb 10, 2013

It's not worth switching away from rbenv just for this. I'm just going to implement a little logic to get the current stable version for my build script. Not a huge deal.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost May 12, 2015

If someone is looking for a way to install the latest stable version of MRI using rbenv, I have a Stack Overflow question about it: http://stackoverflow.com/questions/30179484/make-shell-script-install-latest-stable-version-of-ruby-using-rbenv/301798499

Hope it helps anyone writing custom Bash install scripts.

ghost commented May 12, 2015

If someone is looking for a way to install the latest stable version of MRI using rbenv, I have a Stack Overflow question about it: http://stackoverflow.com/questions/30179484/make-shell-script-install-latest-stable-version-of-ruby-using-rbenv/301798499

Hope it helps anyone writing custom Bash install scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment