by tptacek · 15y ago · 0 comments
For at least a year now, I've simply accepted that Debian's Ruby lives in a parallel bizarro-universe, rm'd any trace of it that intrudes on my own (real) universe, and installed everything from source.
I write this not to feel better about myself but to attract the passionate, angry disagreements that will help me better understand the problems this guy was trying to solve, so I can understand how he looks at the world and what his decision means instead of silently hoping that this post means nobody is going to try to integrate Debian and Ruby anymore.
Ruby, RVM, ruby-gems etc were all designed and built for developers. APT was designed and built for system administrators.
In the world of system administrators, API differences between versions 2.3.5 and 2.3.8 would be considered bugs. In the world of Ruby/Rails, that's just standard practice. APT would not let you install both 2.3.5 and 2.3.8 simultaneously because that would be silly. It is silly, but it's useful for developers. The detriments are obvious to everybody but the Ruby community -- DLL hell is one of the major factors in the decline of the Windows platform.
So yes, keep Ruby off in it's own parallel universe, partitioned off using RVM or bundler. As a developer, this brings you many real benefits. But recognize the real detriments to normal users and system administrators, and place the blame squarely where it belongs -- on the Ruby community.
I don't "blame" anyone. I think Debian is wrong about Ruby.
One use case would be if someone, say a sysadmin, wants a good bug tracking system for internal use at their company.
apt-get install redmine
Fetches Rails, Ruby and so on, and sets it up in a default, reasonably secure way (as far as I know, I haven't the Debian version myself).That sort of thing is pretty commonplace with PHP web applications under Debian and Ubuntu. Granted, if you're going to hack on and modify the application in question, yeah, you may want to get it and install it yourself, but when things work well, a good packaging system lets you install and work with code that perhaps you do not know intimately.
I think you're making the mistake of viewing the world exclusively from the point of view of a Ruby developer. What would happen if you had to deal with different systems to install, maintain and upgrade the Linux kernel, Apache, Postgres, Sqlite, Ruby, GCC, Perl, Python, Gnome, and various submodules used by them? There are times when it's necessary to install your own version of something, but it's awfully, awfully nice that you can "choose your battles", and really only do that with stuff you care about and follow closely.
Sounds like Linux in the days when you installed Slackware and then just upgraded stuff by randomly recompiling bits and pieces every now and then.
BTW, I would hope that we could skip any "angry disagreements" here. Passion will do more than suffice!
apt-get install rubygems
gem install redmine
I know it's two steps and they have to understand the dependency, but the truth is everyone in the Ruby world kind of assumes you're using Rubygems, and repackaging things from one packaging format to another just seems like it's asking for trouble.Sysadmins can learn that if they want something from the ruby world they have to install rubygems.
* "Sysadmins can learn that if they want something from the Python world they have to install pip."
* "Sysadmins can learn that if they want something from the Lisp world they have to install clbuild."
* "Sysadmins can learn that if they want something from the Lua world they have to install luarocks."
* "Sysadmins can learn that if they want something from the PHP world they have to install PEAR."
* "Sysadmins can learn that if they want something from the Perl world they have to install CPAN."
* "Sysadmins can learn that if they want something from the Haskell world they have to install cabal."
* "Sysadmins can learn that if they want something from the O'Caml world they have to install godi."This is why RubyGems was developed, because neither Windows nor Mac OS X have package managers built in. Debian maintainers may despise RubyGems and what it represents, but the RubyGems developers have never been unwilling to take patches that make them better citizens. They have not, however, been interested in neutering fundamental features.
RubyGems needs to REMOVE harmful features, like the ability to install multiple minor versions of the same gem. Developers should be using RVM to get this capability.
I can't count the number of times that we rolled out (while I was at the AJC) a new version of one of our apps on a different version of rails while keeping the other apps collocated on the same box running the previous version.
Have a look at NixOS for a different approach to the problem.
The Linuxes are the least-well represented and the least interested in working with RubyGems developers. There are hooks to make things work better: they were first offered by Apple and subsequently modified by Eric Hodel to be more generic so that Debian could benefit. They refused to use these vendor hooks.
You're right that apps that target "desktop" users bundle Ruby, but I remember a game from 2001 that bundled Python. This is no different. Apps need to control their dependencies (my company's backup app includes vendor-locked versions of OpenSSL in the program directory because we can't trust full compatibility without that)
Edited to add:
The RubyGems multiple version feature (which is one of the things that the Debian team seems to dislike) doesn't assign any meaning to version levels. The fact that 1.2.3 usually means "major version 1, minor version 2, patch version 3" is entirely social and of no meaning to RubyGems. The only thing that it cares about is that version A is comparably larger or smaller than version B. I could have version 1.2.3.4.5 and 1.3.5.7 and it would only care that the latter is larger (because the second level of the latter is larger than the second level of the former).
Removing this but keeping "top-level" versions would encourage people to rev their top-level versions more often. This may not be a bad thing, but it won't give you the effect you think it will.
Debian's primary concern is for end users, those who install applications via the pretty GUI. RubyGems made some choices that are very poor for these users.
The Ruby community has decided that these users are unimportant. And that's fair, there aren't many of them. "Fixing" RubyGems would not help developers, would not help web apps, would not help OS X or Windows end users, all of whom far outnumber Linux end users.
But recognize that this is a deliberate decision on the part of the Ruby community to ignore these users. But these Linux end users are Debian's raison d'etre, so recognize that the blame properly belongs on the shoulders of the Ruby community.
It may be a reasonable decision on the Ruby community's part, but it's still their "fault".
Now, I am not sure with one either way since I don't use Ruby, and am merely interpreting the sentence above.
Code talks. Provide a patch and I'm sure they'll take it, because it's a good step forward. If you do make such a patch, you'll need to consider what should happen if the user is running "gem install" without appropriate privileges or if the user is running on a system where there's no bin/ or sbin/ differentiation (e.g., Windows).
this is good magic
See the rest of the thread for the ... complaints that are raised.