indirect changed the topic of #bundler to: Docs! http://bundler.io | Problems? http://bit.ly/bundler-issues | How to help: http://bit.ly/bundler-development | API Dashboard http://cl.ly/SBoH | #bundler logs: http://bit.ly/bundler-logs | Questions will be answered eventually, so hang out for a while
axl_ has joined #bundler
axl_ has quit [Client Quit]
iamjarvo has quit [Quit: Textual IRC Client: www.textualapp.com]
Fooster has quit [Ping timeout: 244 seconds]
Cidan is now known as zz_Cidan
huoxito has quit []
leif_ has joined #bundler
<leif_> hi everyone, I have a question about vendoring, which is causing me an issue with guard-rspec and foreman - is this an appropriate place ?
<leif_> ok I'll just go ahead and start.
<leif_> When I do the following bundle install --path vendor/bundle --binstubs vendor/bundle/bin --jobs=4 everything installs as expected, and I see gem files where required etc. After that I do the following bundle exec foreman start which fires up guard and unicorn for me. Then I hit an issue. Guard is trying to setup guard-rspec, which in turn tries to run bundler. And I get this error. 13:31:49 guard.1 | /usr/local/var/rbenv/versio
<leif_> wow that did not format well, trying again
<leif_> When I do the following
<leif_> bundle install --path vendor/bundle --binstubs vendor/bundle/bin --jobs=4
<leif_> everything installs as expected, and I see gem files where required etc.
<leif_> After that I do the following
<leif_> bundle exec foreman start
<leif_> which fires up guard and unicorn for me. Then I hit an issue.
<leif_> Guard is trying to setup guard-rspec, which in turn tries to run bundler. And I get this error.
<leif_> 13:31:49 guard.1 | /usr/local/var/rbenv/versions/2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'bundler' (>= 0) among 143 total gem(s) (Gem::LoadError)
<indirect> IRC only allows one line of text at a time
<leif_> And if I search my vendored gems, bundler is indeed not there.
<indirect> you’ll likely need to put the full error into a paste service
<leif_> I can do that - in a minute
<indirect> foreman doesn’t usually expect to be run by bundler
<leif_> A workaround this is to set my GEM_PATH as follows
<leif_> export GEM_PATH=/Users/leif/src/box_app/vendor/bundle/ruby/2.2.0:/usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0
<leif_> This allows Guard to now find the installed bundler, and the error goes away and everything is sweet.
<indirect> I would expect that you need to change your Procfile to run `bundle exec guard` and `bundle exec unicorn`
<leif_> So my first thought is that bundler should vendor itself when we pass --path and --binstubs, and we just set the GEM_PATH to the vendored gems. Or that bundler, when it checks for vendored gems, sees that itself is vendored and makes sure guard-spec (and any other utility) will find itself there.
<leif_> Thoughts ?
<indirect> not a good idea
<leif_> foreman doesnt expect that ? is that documented as a best practice ?
<indirect> yes
<indirect> every example of how to use forman I have ever seen says to put `bundle exec` in your Procfile and to run `foreman start`, not `bundle exec foreman start`
<indirect> if you really want to install bundler into the bundled gems
<indirect> you can just run `bundle exec gem install bundler`
<indirect> by running `bundle exec foreman start`, you’re creating multiple nested bundler contexts
<leif_> ok - and the reason why vendoring bundler is a bad idea ?
<leif_> is it just in this scenario ?
<indirect> yeah
<indirect> just this scenario
<indirect> guard is written with the expectation that it will be run at a high enough level that it can load bundler
<indirect> as you saw with that exception
<indirect> guard could be written in such a way that it would work
<indirect> but they decided not to do that
<indirect> the fix is not to force bundler into the gems needed by your application (beacuse bundler is already installed at the system level)
<indirect> it’s to just run guard at the level that guard expects
<leif_> ok - the only thing that makes me uncomfortable is that foreman has a dependency on thor - as does guard - so its possbile/probably foreman will use one version of thor and guard (under foreman) another. Shoul I worry ?
<indirect> no
<indirect> they’re completely separate ruby processes
<indirect> foreman loads the system version of thor
<indirect> and then it creates a completely new ruby interpreter to run `bundle exec guard`
<leif_> ok I'll need to go away and think about that for a while.
<indirect> that ruby process loads bundler, which only allows the version of thor requested in the gemfile, and then guard loads that version of thor
<leif_> ok so thanx for helping. I appreciate it. I am concerned if I am setting my self up for a problem when I deploy to Heroku.
<leif_> but Heroku wont run foreman the way I am either I guess
leif_ has quit [Quit: Page closed]
relix has joined #bundler
jhass has quit [Read error: Connection reset by peer]
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
jds has joined #bundler
houhoulis has quit [Remote host closed the connection]
jhass has joined #bundler
Fooster has joined #bundler
Fooster has quit [Ping timeout: 255 seconds]
Fooster_ has joined #bundler
jhass is now known as DeBot
DeBot is now known as jhass
Fooster_ has quit [Ping timeout: 264 seconds]
Fooster has joined #bundler
Guest24 is now known as lele
jds has quit [Quit: Connection closed for inactivity]
Fooster has quit [Ping timeout: 252 seconds]
Fooster has joined #bundler
_djbkd has joined #bundler
Fooster has quit [Ping timeout: 265 seconds]
_djbkd has quit [Remote host closed the connection]
_djbkd has joined #bundler
Fooster has joined #bundler
_djbkd has quit [Remote host closed the connection]
djbkd has joined #bundler
djbkd has quit [Remote host closed the connection]
djbkd has joined #bundler
djbkd has quit [Remote host closed the connection]
Fooster has quit [Ping timeout: 246 seconds]
rgb-one has joined #bundler
rgb-one has quit [Ping timeout: 256 seconds]
rgb-one has joined #bundler
whoojemaflip has quit [Remote host closed the connection]
indirect has quit [Remote host closed the connection]
mjc_ has quit [Remote host closed the connection]
schisamo has quit [Remote host closed the connection]
djbkd has joined #bundler
djbkd has quit [Ping timeout: 244 seconds]
houhoulis has joined #bundler
schisamo has joined #bundler
whoojemaflip has joined #bundler
mjc_ has joined #bundler
jrafanie has joined #bundler
indirect has joined #bundler
djbkd has joined #bundler
Fooster has joined #bundler
Fooster has quit [Ping timeout: 250 seconds]
AlHafoudh has quit [Ping timeout: 264 seconds]
AlHafoudh has joined #bundler
AlHafoudh has quit [Read error: Connection reset by peer]
allcentury has joined #bundler
Fooster has joined #bundler
djbkd has quit [Remote host closed the connection]
djbkd has joined #bundler
djbkd has quit [Ping timeout: 252 seconds]
djbkd has joined #bundler
djbkd has quit [Ping timeout: 272 seconds]
allcentury has quit [Quit: WeeChat 1.1.1]
Fooster has quit [Ping timeout: 258 seconds]
lele is now known as Guest24
jrafanie has quit [Ping timeout: 245 seconds]
Fooster has joined #bundler
Fooster has quit [Ping timeout: 250 seconds]
Fooster has joined #bundler