Live data from Hacker News

RVM 2.0: Convert 20,000 lines of shell script into Ruby [Fundraiser]

bountysource.com

21–30 of 60 posts

Re: RVM 2.0: Convert 20,000 lines of shell script into Ruby [Fundraiser]

#21
post #8
post #4

Rvm is still around? I switched to rbenv years ago, never looked back.

I'm sorry, but why shouldn't RVM still be around? Did it suddenly become obsolete the minute you switched to rbenv?

RVM shouldn't still be around because of its user-hostile behavior of modifying the user's dotfiles (.bashrc, etc.) on installation without warning or permission.

This breaks other software in confusing ways. For example, I've had cases where after installing it, I could not view man pages for any programs because installing RVM modified broke my $MANPATH. In other cases, things that were failing for other reasons started producing confusing errors due to RVM doing sketchy things like replacing cd with a shell function.

Re: RVM 2.0: Convert 20,000 lines of shell script into Ruby [Fundraiser]

#22

Earlier quoted context omitted.

I tried switching to rbenv, but I kept getting frustrated with the process.

And this is exactly the problem with all those "simpler" alternatives to RVM. They all claim to be simpler and doing less "unnecessary" stuff. And they are simpler, from a technical point of view. But unless you, the user, is very skilled at Unix and knows exactly how environment variables, shell sessions, bashrc etc works, it's going to be more confusing. RVM is more complicated because it does more, in order to mak…

The fact that RVM "does more" means that users need to understand more in order to fix problems that it causes. If you install RVM and other things on your system break due to its tampering with .bashrc, you need to understand what it has done. If I didn't understand $PATHs, etc., I would still be unable to use "man" due to $MANPATH being broken from the last time I installed RVM.

Re: RVM 2.0: Convert 20,000 lines of shell script into Ruby [Fundraiser]

#23

Earlier quoted context omitted.

Silly man, that wouldn't require $50,000.

RVM is larger and does a whole lot more than chruby. For one, it's much more friendly to new users and doesn't suffer from usability problems like these: https://github.com/postmodern/chruby/issues/212 https://github.com/postmodern/chruby/issues/213

RVM doesn't suffer from those specific usability problems, but it most certainly does suffer from usability problems. I've wasted many, many hours debugging issues caused by RVM. For the most part, those issues are because RVM is larger and does a whole lot more than chruby, and since switching I haven't once missed any of those extra features.

Re: RVM 2.0: Convert 20,000 lines of shell script into Ruby [Fundraiser]

#24

I would love to hear more about "leverage existing package management systems". I guess many people use rvm to install ruby and I always recommend newbies to try it out for that purpose. But recent criticisms of ruby made me wonder if that really is the right approach. Maybe it would be better to put more effort into creating top-notch packages for the major linux distros (and, say, homebrew). And to work with the di…

Creating proper platform-specific packages is a mad undertaking, requiring huge amounts of manpower to setup and to maintain. We provide native Phusion Passenger packages for 5 platforms (3 Ubuntu versions, 2 Debian versions, OS X Homebrew) and it's already crazy complicated. Check out the toolchain that we spent months on building: https://github.com/phusion/passenger_apt_automation https://github.com/phusion/passen…

> Creating proper platform-specific packages is a mad undertaking, requiring huge amounts of manpower to setup and to maintain.

Of course you are right, and I am well aware of this. After all, that is the reason it has not been done before.

Still, a crazy amount of effort went into creating and maintaining rvm, rbenv and the myriad of other tools we now have. I cannot help but wonder where we would stand now had all of this instead been directed towards great packaging.

> You'd end up with at least 100 different packages, and you'll have to test each one of them. That's going to cost much more than a one-off campaign of $50000.

I am not quite so pessimistic. What I am daydreaming about would involve the distributions and their package maintainers. They already ship ruby right now. The packages are just not in optimal shape and oftentimes not up to date.

But one can surely build on the foundation already laid out by the distributions and work with them to hand off some of the work.

Still, I know this would be a herculean task. And not only a technical challenge, but a social one as well.

Re: RVM 2.0: Convert 20,000 lines of shell script into Ruby [Fundraiser]

#25

Earlier quoted context omitted.

I tried switching to rbenv, but I kept getting frustrated with the process.

And this is exactly the problem with all those "simpler" alternatives to RVM. They all claim to be simpler and doing less "unnecessary" stuff. And they are simpler, from a technical point of view. But unless you, the user, is very skilled at Unix and knows exactly how environment variables, shell sessions, bashrc etc works, it's going to be more confusing. RVM is more complicated because it does more, in order to mak…

> unless you [are] very skilled at Unix

I don't understand this mentality. rbenv isn't advanced shell scripting by any means. Every working programmer should have the minimal unix skills required to read and understand rbenv in its entirety in one sitting.

It should take no more than a week of concerted effort to learn your way around bash: You can read `man bash` linearly in an afternoon or two. For such a small price, you can gain hugely disproportional leverage.

> had to manually mess with $PATH, bashrc and other stuff

Personally, I wish Unix had a better framework for these sorts of environment/dependency/versioning needs, but altering $PATH in your bashrc is about as easy as it gets. It's not nearly as nice as a union mount plan9-style, but it's what we're stuck with, and it should take you no more than 5 minutes to understand and install rbenv. If not, then you should `man bash` and invest that time. Again, for such a small investment, you get a tool that is non-magic enough to trust on your production server too, rather than putting the rvm mystery box in to the wild.

Re: RVM 2.0: Convert 20,000 lines of shell script into Ruby [Fundraiser]

#27
post #9

How does one write a page like that, without even trying to explain, in a single sentence, what "RVM" is ? It surely wouldn't hurt? I assume that if you don't know (like me), you're not in the target audience of people willing to chip in to get the conversion done, but it still manages to frustrate me.

It's definitely something only targeted to Ruby devs. If you use ruby, you know what RVM is.

To answer your question, RVM is a version manager for Ruby. http://rvm.io/

Re: RVM 2.0: Convert 20,000 lines of shell script into Ruby [Fundraiser]

#28

I would love to hear more about "leverage existing package management systems". I guess many people use rvm to install ruby and I always recommend newbies to try it out for that purpose. But recent criticisms of ruby made me wonder if that really is the right approach. Maybe it would be better to put more effort into creating top-notch packages for the major linux distros (and, say, homebrew). And to work with the di…

I don't know if creating top notch packages is too realistic, when the biggest difficulty with that is often the platform policy (e.g. insistence on separating documentation and runtime, even if it's more tightly coupled that it looks, having only one executable per package...) that is the biggest hurdle to overcome.

The fact that no platform got it right for Perl, Python nor Ruby points to a huge difficulty...

Re: RVM 2.0: Convert 20,000 lines of shell script into Ruby [Fundraiser]

#29
post #8

Earlier quoted context omitted.

I'm sorry, but why shouldn't RVM still be around? Did it suddenly become obsolete the minute you switched to rbenv?

RVM shouldn't still be around because of its user-hostile behavior of modifying the user's dotfiles (.bashrc, etc.) on installation without warning or permission. This breaks other software in confusing ways. For example, I've had cases where after installing it, I could not view man pages for any programs because installing RVM modified broke my $MANPATH. In other cases, things that were failing for other reasons st…

> RVM shouldn't still be around because of its user-hostile behavior of modifying the user's dotfiles (.bashrc, etc.) on installation without warning or permission.

RVM tells the user very clearly that it has modified the user's dotfiles.

And how many people do not want to modify the dotfile? Which user thinks, "oooh, modifying dotfiles is so evil, I'll just type in this command every single time I open a terminal"?

At the end of the day, RVM just inserts a few lines to the dotfiles. What's the problem with that?

Actually, chruby does not modify my dotfile for me, and I thought that modifying the dotfile is optional. I figured I'll just manually source chruby.sh every time I want to use it, just to experience how it's like. And then I ran into issues like this: https://github.com/postmodern/chruby/issues/213

Thanks but no thanks. I'd rather have the software modify my dotfile so that it can give me a pleasant user experience.

> For example, I've had cases where after installing it, I could not view man pages for any programs because installing RVM modified broke my $MANPATH. In other cases, things that were failing for other reasons started producing confusing errors due to RVM doing sketchy things like replacing cd with a shell function.

Never seen these problems before. Have you reported these problems? Have they been fixed in the latest version? If these problems are fixable then why throw the baby out with the bath water?

As for replacing cd with a shell function: it's because it's one of the few ways auto-switching can be implemented. They found in a user survey that 80% of the users want auto-switching, so who are they to say "no" to their users?

What problems have you experienced because of this? chruby's auto.sh implements the same functionality by installing itself into the shell's DEBUG hook... but is that really any better?

Re: RVM 2.0: Convert 20,000 lines of shell script into Ruby [Fundraiser]

#30

Earlier quoted context omitted.

And this is exactly the problem with all those "simpler" alternatives to RVM. They all claim to be simpler and doing less "unnecessary" stuff. And they are simpler, from a technical point of view. But unless you, the user, is very skilled at Unix and knows exactly how environment variables, shell sessions, bashrc etc works, it's going to be more confusing. RVM is more complicated because it does more, in order to mak…

The fact that RVM "does more" means that users need to understand more in order to fix problems that it causes. If you install RVM and other things on your system break due to its tampering with .bashrc, you need to understand what it has done. If I didn't understand $PATHs, etc., I would still be unable to use "man" due to $MANPATH being broken from the last time I installed RVM.

Correct, but it also means that the authors take responsibility for fixing those problems. That's the attitude we have for Phusion Passenger: it does a lot of stuff for you so that you don't have to. And if things break because of our fault, we take the responsibility of fixing it so you don't have to and can concentrate on your own business.

Have the RVM authors not fixed the problems you experienced?

Post reply on HN