

That Will Be Easy (It's Never Easy) - montanalow
http://www.omniref.com/blog/blog/2014/03/20/itll-be-easy-how-we-built-gemfile-uploads-for-omniref/

======
pretz
I would love to hear more about what it took to wrestle Bundler to do what you
guys needed and any insight into how Bundler's design could have been improved
to make doing this easier.

~~~
timr
Yeah, I should write a more detailed post with all of the horribleness that
was involved...I didn't want to get that far into the weeds for this.

The worst of it was probably the environmental contamination that Bundler does
-- you don't realize it when you're running it from the command line, but it
has all sorts of little system-level side effects, from setting secret config
variables to updating caches. And those side-effects change as you do
different things. And they're not documented.

The result is that if you want to run Bundler (or even parts of Bundler) as
part of other code, you need to be _very_ careful to establish a strict
sandbox (i.e. tmp directories and clean environment are the starting point) --
and even then, it's pretty easy to get hosed.

Just figuring that stuff out took the better part of a few days, not counting
the time it took to figure out how it _actually works_ , of course.

