4 ms·
I started using RVM a little while ago, and... I am not that excited about it (although it is well done and mostly works as advertised). It seems like the dire
by davidw 16y ago
I started using RVM a little while ago, and... I am not that excited about it (although it is well done and mostly works as advertised). It seems like the direction Ruby is going is to have things like Rails applications that require their own version of Ruby and a whole slew of gems, which also means that if you have a number of applications, you start getting a large amount of duplication? I'm not entirely sure as I'm new to the system, but it adds an extra level of installed stuff that I'm not 100% comfortable with.
Edit: as an aside, Zed Shaw's wild attacks and untruthful accusations against Debian were some ugliness that the world could have done without. I hope Lucas finds other places to more productively (and happily) employ his talents in the free software world.
- count 16y agoMakes applying security patches a whole bunch of fun too!
- gregwebs 16y agohow is applying patches more difficult? I would think it is normally easier because one can RVM install a new release that has the patches applied.
- davidw 16y agoIt's yet another way of installing software on my system. Currently I: * Use apt-get for pretty much everything. * Locally install a few project specific things. These often are installed locally, not system-wide, and have nothing to do with root. * Use rubygems. It's nice, but I don't have the same level of confidence in it regarding security that I do about Debian and Ubuntu. It seems to just give me 'updates' to gems, without much of a way of knowing which updates are security fixes and which are simply improved versions of the packages in question. RVM adds one more thing. And for each Ruby instance in there, I might have various versions of gems floating around. This does not make me happy from a security point of view.
- mechanical_fish 16y agoThis might be true, but it does depend on how the release management is done. What else is part of that new release? Is it guaranteed to be a set of minimalist patches to fix security issues, or do the developers also take the opportunity to "tidy up" the API, or take out some of those "deprecated" features, or (god help us) introduce new functionality? [1] Much of what we see here is a dev/ops culture clash. Sysadmins like well-established system-level packaging systems like .deb and .rpm. They like them because they have well-established semantics ("this thing is obviously a security patch; that thing is probably a feature upgrade"), and they like them because these systems abstract away the need for the admin to understand the details of the release model of five or ten or a hundred different open-source ecosystems. Part of OP's complaint is that (from his perspective) the Ruby community has release semantics that he doesn't understand. Is that patch to Ruby 1.8.7 really just a "security fix"? Can it probably be safely applied to 1,000 production servers without causing downtime? --- [1] I should note: I'm not accusing Ruby developers, or any other developers, of ever having done any of these things. But these are the dark thoughts that keep engineers up at night. Especially when managing codebases built on ecosystems that they don't intimately understand.
- steveklabnik 16y agoIt's still pretty easy. $ rvm install ruby-head-r29837 --patch refinements.diff For example. Bam! You're done.
- davidw 16y agoWith one command, apt-get, I can use the same command line to install security updates for the Ubuntu versions of Ruby, Python, Java, Lua, Perl, Tcl, PHP, Erlang, Haskell, Ocaml and whatever else I happen to use. If you have to learn a separate "pretty easy" command to get security updates for the various systems on your computer, you are screwed. I think having one or two extra routes for systems that you use heavily (you're a Ruby dev or a Java dev or something like that) is probably ok, but it's still nothing I'm thrilled about.
- steveklabnik 16y agoTruth. I'm not saying it's ideal, just that it's pretty easy compared to say, a source install.
- jshen 16y agobut then your stuck using whatever version of ruby your distro is own. If your core development is ruby, I wouldn't leave that decision to someone else.
- davidw 16y agoActually, it's generally not that hard to take an existing Debian package and update it to the latest version of whatever software you're dealing with, if you absolutely must run a particular version. Also, Debian takes a lot of efforts to make different major versions run in parallel, like Ruby 1.8 and 1.9, Tcl 8.4 and 8.5 and so on.
- jshen 16y agothat's very different than what you seemed to be implying by "with one command I can update everything". rvm is easier than creating your own deb or rpm
- gregwebs 16y agoYou don't have to have any duplication (with RVM and bundler) if you use the same ruby version on your projects. Requiring an exact version of Ruby for a project is a practice that avoids rare issues of version inconsistency.
- davidw 16y ago> Requiring an exact version of Ruby for a project is a practice that avoids rare issues of version inconsistency. If they're rare, you ought to identify them, and, rather than require an exact version, say "this version or greater", and spell out exactly why in the comments, so that future users of your code will know precisely what code is affected and be able to reason about it themselves.
- mechanical_fish 16y agosay "this version or greater" That only works if all future versions are guaranteed to be backwards-compatible with the current version. A guarantee that does not exist. See here: http://yehudakatz.com/2010/08/21/using-considered-harmful-or-whats-wrong-with/ http://yehudakatz.com/2010/08/21/using-considered-harmful-or... A version requirement is a statement that "I have tested this code with these versions of the dependencies and verified that it works." Yes, given sufficient time and energy one can also test the code against many older versions of the dependencies, find any bugs, and include explanatory comments, as you suggest. But one can't test against the dependencies as they will exist in the future.
- davidw 16y ago> That only works if all future versions are guaranteed to be backwards-compatible with the current version. A guarantee that does not exist. It's not the sort of thing that's easy to prove empirically one way or the other, but I get the feeling (despite being a heavy user and fan of Ruby) that other languages take that guarantee more seriously. It's a tradeoff: by not spending much effort on backwards compatibility, they can spend more time developing "cool new stuff". Users get more new stuff faster, at the expense of having to worry more about upgrades breaking things.
- mechanical_fish 16y agoWhat is wrong with duplication? In general, there are a few possible answers: A) Duplicate code sucks up storage space, and bandwidth to transfer it around. There was a time, in living memory, when this argument was strong. But it became moot several years ago when they started giving away free encyclopedias in my breakfast cereal. B) Duplicate code sucks up memory in running processes. This argument is still potentially strong, but without getting into the important Ruby-centric details (Can separate processes usefully share Ruby code anyway? What are the mechanisms for that? Do people really often run more than, say, two Ruby interpreter codebases on any given machine?) let's just point out that this is premature optimization -- especially in 2011, when RAM is cheap, boxes are cheap, everything is virtualized, and you should probably be running every application in its own virtual server anyway. In the general case, it is more important that code be simple to install, correct, and reliable than that it have a light memory footprint. If you are smart enough and motivated enough to understand the need to optimize your software you have the tools to do so. C) Duplicate code creates management headaches. You think you've updated the gem, but you've really only done so in one place. You forgot the other six places. This is a real concern, but RVM plus Bundler represents an improvement, not a regression. For one thing: Before RVM there were several incidents where I battled the infamous `gem install` vs `sudo gem install` dichotomy. That problem -- getting every app and library to load the right library path without using RVM -- is an order of magnitude more confusing than anything in RVM.
- davidw 16y agoI agree completely with A for most things outside of embedded systems, and even those are generally getting more and more space, and Ruby isn't really ideal for that anyway. I disagree with B somewhat. I currently have a machine running about a dozen different Rails applications with no problems at all. I am indeed unhappy with the fact that Ruby does not share code better, because I could either save money on monthly costs or add more applications (I do know about "Enterprise" Ruby but prefer to stick with the system version). And yes, memory is cheap, but costs do multiply when you have to pay for extra ram every month (ala Linode). I also don't want or need the overhead for separate virtual servers for each and every application I happen to write unless they get big. However, yes, C) is really the main concern. And I've found that just using system (root) level gems is the best way of keeping everything sane. I don't install per-user gems. So for me RVM/Bundler represents a real extra step and more things to know about than just gems by itself. In the end, I use Ruby a lot these days, so I'm not unhappy with RVM. It's well done, and generally a good thing. I guess I just don't like the direction it seems to represent: packaging each thing in its own world. I prefer a shared world with divergences only where they are required.