khebbie has quit [Remote host closed the connection]
agis- has joined #bundler
habitullence has joined #bundler
rgb-one has quit [Remote host closed the connection]
<mrgrieves>
hi, I've been trying to use bundler for code-shipping purposes but I'm getting inconsistent results with our particular workflow
<mrgrieves>
I'm pretty sure a significant part of the reason is due to my lack of understanding but I'm hoping I can get some direction from you
khebbie has joined #bundler
<mrgrieves>
we have a production target box with a user where we hope to run bundle exec commands. This production box doesn't have the ruby-devel libraries installed but we do have a CI box which has the production version of ruby installed and in which we can install devel libraries
<mrgrieves>
suposse we have a fresh user created in our CI box and the only gem listed by "gem list" is bundler, what workflow would you advise to follow to get everything deployed locally so we can then package and drop in prod?t
<jhass>
install everything you need to build the stuff from your Gemfile to the prod box and do it on deploy. Unless you can _guarantee_ your CI box is an exact mirror of the prod box + devel headers
<jhass>
there's bundle package which you can use to include the unbuilt gems so you don't have to do that during deploy
<jhass>
*don't have to download them
<jhass>
you should still bundle install --deployment during deploy, do not ship vendor/bundle or anything like that built on CI to prod unless you can absolutely guarantee ABI compatibility for all involved libraries
<mrgrieves>
jhass: thanks! now, one of the problems we have is that the prod box doesn't have direct internet access (i.e. we can't get gems installed from rubygems)
<jhass>
that's what bundle package is for
<jhass>
bundle help package
<mrgrieves>
yes, my first approach was to bundle package on CI and ship the .gems in vendor/cache but when I went to do bundle install --local the installation went fine for some of the gems but got an error with ffi "ERROR: Failed to build gem native extension"
<mrgrieves>
that's bundle install --local in prod*
<mrgrieves>
that's when I realized we didn't have the devel libraries available in prod
<mrgrieves>
we could try to guarantee ABI compatibility because we kind of have full control over CI
<mrgrieves>
actually I might take that back unless it's enough if we match CPU arch and ruby versions (with devel libraries)
<mrgrieves>
kernels might be diff between CI and prod
<jhass>
hf, I predict that to be a far greater headache than installing the devel headers on prod
<jhass>
and no, that's not enough
<jhass>
kernel doesn't matter, arch does, but more importantly library versions
<jhass>
not only Ruby, but also things like libxml2 for Nokogiri, libjson, libffi and what not
<jhass>
you'll also need soname compatibility
<jhass>
so you want the same distribution on the same upgrade level always
<jhass>
btw you also should do --deployment on prod so you don't accidentally install different versions (it prevents the Gemfile.lock from changing)
<mrgrieves>
I think there's only one way to find out ... by trying
<mrgrieves>
what's the best way to build the gems locally in CI?
<jhass>
CI too should too do --deployment which implies --path vendor/bundle
<jhass>
you then *could* copy vendor/bundle over, but let me repeat that I strongly advise against that approach
<mrgrieves>
so with --deployment I should end up with the built gems in vendor/bundle, right?
<jhass>
that's what I just said
<mrgrieves>
I'm with you, I just need to explore all avenues so I can also advise people around here
<mrgrieves>
cheers jhass
<mrgrieves>
let me try ...
<jhass>
mrgrieves: even if it works now for you there's no guarantee it won't suddenly break (in possibly subtle ways) as your dependency tree or OS upgrade level changes
<mrgrieves>
you are right
<mrgrieves>
now that I'm testing in my dev env I see something interesting, I'm getting the same as in prod http://pastebin.com/aYiJq929
<jhass>
you're missing devel headers for ffi
<jhass>
also keep in mind that Ruby 1.8 and its successor 1.9 is no longer in official security maintenance
<mrgrieves>
thanks jhass
rgb-one has joined #bundler
agis- has quit [Remote host closed the connection]
habitullence has quit [Quit: habitullence]
khebbie has quit [Remote host closed the connection]
khebbie has joined #bundler
habitullence has joined #bundler
khebbie has quit [Remote host closed the connection]
agis- has joined #bundler
agis- has quit [Remote host closed the connection]
agis- has joined #bundler
Gidogeek has joined #bundler
chouhoulis has quit [Remote host closed the connection]
Scrivener has joined #bundler
khebbie has joined #bundler
agis- has quit [Remote host closed the connection]
khebbie has quit [Remote host closed the connection]