I just merged @jpmckinney's bundler branch to develop, so Alaveteli
now installs dependencies with bundler. This should have three
benefits:
1) More portable (particularly wrt OS X)
2) Easier to install more recent dependency versions when necessary
3) It's the Expected Way To Do it in Rails 3, and at some point we
should be considering migrating in that direction
For those of you familiar more familiar with Bundler than me, I have a question:
The latest release of xapian-full doesn't work on Ubuntu. The bug is
fixed in the unreleased version on github. I can force bundler to use
a version from github, thus:
gem 'xapian-full', :git => 'https://github.com/rlane/xapian-full'
However, I find that with this configuration, each "bundle install"
causes it to be recompiled. The behaviour I want is for it only to be
recompiled if the source has changed. Any pointers?
Thanks,
Seb
--
skype: seb.bacon
mobile: 07790 939224
land: 01531 671074
gem 'xapian-full', :git => 'https://github.com/rlane/xapian-full',
:ref => "7d577f7fa2"
Info here http://gembundler.com/git.html
Thanks, but specifying a full ref still results in bundler recompiling
the extension each time I run "bundle install". I can't find any
mention of this behaviour in the docs. As James says, I would have
expected the Gemfile.lock to govern this behaviour.
Looking at the bundler source code, I see that for a Rubygems source,
there is code to skip the installation step if it's already installed
[1]. However, for a Github source, there is no corresponding logic
[2].
I don't really have time to investigate this further, which is
frustrating. I'm half-guessing from scanning the Bundler code that it
is meant to fake up gem specs for things that aren't actually provided
as packaged gems, and somehow this hasn't been implemented for github
sources. Which means that Gem doesn't know about things installed via
github. Something like that *waves hand*.
Unfortunately, this will hold up making a release because we promise
to support Ubuntu. I guess if no-one else has time to investigate I
could petition the xapian-full maintainer to make a new release to
rubygems. Maybe I'll do that anyway as fixing this would appear to
need a fix to Bundler...
Thanks,
Seb
[1] https://github.com/carlhuda/bundler/blob/master/lib/bundler/source.rb#L73
[2] https://github.com/carlhuda/bundler/blob/master/lib/bundler/source.rb#L560
seb