[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

A proposal: A (possible) way to make ruby1.9.1 and gems better on Debian/Ubuntu



Recently I decided to learn more Ruby, not wanting an unclean system and
being somebody who ultimately loves Debian because I can shape my system
how I want, even with apt packages, and not knowing anything about Ruby
I opted to learn from Debian by installing the Debian managed ruby1.9.1.
 Plus I learned along the way that Debian is the best when it comes to
operating system maintained Ruby.

At first I was frustrated to learn that Gems came with the ruby1.9.1
package (I do not know why I was frustrated) because even the rails site
says you should not use gems from Debian (I did not and still do not
understand why, unless it has to do with update time. Which does not
matter to me.)

After my frustration ended I learned that Gems is kind of integrated
into ruby now so I should stop listening to old suggestions and find
ways to integrate my mission for Ruby and Debian mission to make Ruby
the best it could be on Debian.

After I installed ruby1.9.1 package and got ruby1.9.2 I looked at
everything that was installed, I viewed it all, learned where it went
there, and why it was chosen.  Then the mission started, why were
certain things not showing up? Was it my fault? Did I fail?  No, it
turns out that some parts were missing from the default install, and
this might not be Debian's fault.

What do I mean by 'why were certain things missing'? Well I mean rake
and rdoc did not show up when I did 'gem list --local' and when I
installed passenger, it broke rake for me :(.  So there my mission
started.  I learned how gems were installed on my system, and found some
tricks that I hope can be integrated into Debian ruby package to improve
it, here they are:

1.) Include a GemSpec and create the initial Gem path before a user
manually initiates a gem install: I spent the better part of today
learning more about GemSpecs and how gems are installed by example;
directly from rake.  I installed rake and broke my ruby install and then
learned that I could make gem recognise the Debian maintained rake by
adding my own gemspec: http://pastebin.ubuntu.com/525014/

2.) Configure the GemSpec to fit Debian needs: After I built my intial
GemSpec by hand, I learned that some parts were incorrect.  So I then
went on a mission to make that GemSpec work with Debian.  Including
getting (later generated Rdoc and RI files) to install in
/usr/share/doc/rake1.9.1.

3.) Work with Upstream to improve gem handling for maintainer based gems
such as rdoc and rake: The idea is that we should work closer with
upstream to try and get them to improve the ability to lock certain
gems.  For example adding the options: s.update = "no", s.uninstall =
"no", s.update_minor = "yes". This is so that users can't break their
Debian maintained Ruby install, or companies like Engine Yard can lock
gems to certain versions for stability, or anybody for that matter.

4.) Use /etc/default/gem for REALLY_GEM_UPDATE_SYSTEM and (if they get
implemented) REALLY_GEM_UPDATE_DEBIAN_GEMS.

I hope to hear back about what you guys think on these ideas. There is a
lot more that I can come up with, but this is what I thought would
really improve Ruby on Debian and it certainly made management of Ruby
on my systems much cleaner for me.


Reply to: