Do we have stats on how many people use the various rubygem rpms / How can we better package rails apps?

Tejas Dinkar tejasdinkar at gmail.com
Fri Sep 23 09:33:16 UTC 2011


Hey all,

I'm wondering if we had any stats on usage patterns for various rubygem
rpms.

I've been developing and deploying rails apps for a while, and here is the
usage patterns that I typically see:

Fact 1: The ruby world evolves (and often breaks APIs) very quickly. RSpec
1.x is totally different from RSpec 2.x. Thus, people tend to keep hard
dependencies on the "~> x.y" version of a gem, which may not be what another
project needs.

Pattern 1: Because of the above, all developers tend to just use the 'gem'
command to maintain their gem stack. Add rvm and rbenv to the mix, which
most developers have adopted. Now, the question becomes the following: "What
does gem provide that rpm doesn't?", and the answer I came up with is the
following:
* Ability to install multiple versions of a gem at the same and let
bundler/3rd party choose what it needs
* Compile a gem that isn't available by default

Pattern 2: Some people use gem to install even on production. As you can
imagine, this is frowned upon because it requires a compiler, and hard to
manage native dependencies. This is considered an anti pattern.

Pattern 3: What people have started doing is to do a bundle deploy
--deployment, which creates a local copy of all gems. After running this on
a deployment-like machine, i just tar/rpm up the whole folder, and drop it
in production. AFAIK, this is considered the best practice

Practical Question 1: Fedora has a policy that if x depends on y, then x and
y must be packaged separately, and then both approved in the repo. Now if z
also depends on y, then we have a general nightmare all round. I was
wondering if it makes sense, knowing this, to package rails apps as per
pattern 3, keeping a local app specific copy of all gems (given, of course,
that all gems meet Fedora's license policies). I know this doesn't make that
much sense for (say) Ruby-Qt apps, but at least it will help package things
like redmine for fedora.

Practical Question 2: Does it make sense to integrate more closely with gem?
I'm not sure what i mean, i'm just tossing it out there. Is there something
that we can do to get some of the benefits i mentioned in Pattern 1 in an
easy way?

--
Tejas Dinkar
C42 Engineering
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/ruby-sig/attachments/20110923/e60fd14a/attachment.html 


More information about the ruby-sig mailing list