Agree on all counts. We've already suggested vendoring the gems inside the buildpack to ensure they're there on the staging container.
toggle quoted message
Show quoted text
I'm now suggesting that the bin scripts just can't find the gems, so Lingesh could try using Gem.paths list the gem locations that the bin scripts have got access to & ensure the vendored gems are on the path.
Hope it makes sense
On 24 May 2016, at 20:25, Daniel Mikusa <dmikusa(a)pivotal.io> wrote:
It's not an issue of pointing to the gems. The build pack runs (staging) in it's own container. The container is completely isolated from the DEA or Diego Cell where it's running. You can't access resources that you've installed on the DEA from inside the container. Anything the build pack needs should be packaged with it. That's the only way to guarantee it will be available when the build pack runs.
The only exception is if you can guarantee that your build pack will only run when the Internet is available. In that case, you could download additional dependencies. That's not a good assumption to make though as a lot of people run without the Internet or behind aggressive firewalls that block the Internet.
On Tue, May 24, 2016 at 2:05 PM, DHR <lists(a)dhrapson.com> wrote:
So I think your problem is that your gems are on the DEA at staging time but aren't being found by the Ruby layer, right?
If so the normal approach is to point to them via an env Var (eg BUNDLE_PATH, GEM_PATH), however your compile, detect, release scripts are already in Ruby (not bash) so perhaps you could load them using Gem.paths. Example on
On 24 May 2016, at 18:08, Lingesh Mouleeshwaran <lingeshmouleeshwaran(a)gmail.com> wrote:
not an issue .Thanks Dan !!!
On Tue, May 24, 2016 at 4:56 PM, Daniel Mikusa <dmikusa(a)pivotal.io> wrote:
OK, my fault. I misunderstood what you're trying to do here. I was thinking that your application needed the gems, but it's your build pack that needs them.
You originally said...
Example : Our modified java buildpack not running on existing stacks because of few of the ruby gems are missing in the file system. so we would require to install few ruby gem and use the modified java buildpack.If the build pack needs additional gems then you would want to pack the gems with the build pack. I'm not sure what the best way to do this would be, I'm sure someone with more ruby experience can say. Ideas that come to mind: add it as a git submodule, vendor it (seems like what you're doing), maybe just copy the src in if it's small.
Basically the build pack needs to be self contained (especially so that it works in offline environments). Anything it needs, should be included with the build pack.
On Tue, May 24, 2016 at 1:37 AM, Lingesh Mouleeshwaran <lingeshmouleeshwaran(a)gmail.com> wrote:
we have used below commands to package the buildpack .
bundle exec rake package version=custom-java-buildpack
after that we will take the zip and create a offline buildpack using cf cli.
On Mon, May 23, 2016 at 7:16 PM, Daniel Mikusa <dmikusa(a)pivotal.io> wrote:
You need to bundle install the gem in the staging container. The build pack would generally do this.
On Mon, May 23, 2016 at 8:25 AM, Lingesh Mouleeshwaran <lingeshmouleeshwaran(a)gmail.com> wrote:
Hi Dan ,
yes I have installed the require gem via bundle install to specify the path of vendor staging directories which is available in below paths
using buildpack Gemfile.
Still I am not seeing these require gem is available in staging container. So staging container during compile phase.
On Mon, May 23, 2016 at 5:35 PM, Daniel Mikusa <dmikusa(a)pivotal.io> wrote:
On Mon, May 23, 2016 at 3:41 AM, Lingesh Mouleeshwaran <lingeshmouleeshwaran(a)gmail.com> wrote:This is the way you should be doing it. What about this doesn't help / work for you?
Thanks DHR and Sunil ,
@ DHR , I have followed your way to install the gem on staging directory , but it doesn't help. is this same way followed by existing cloudfoundry java buildpack ??
@ Sunil ,
Please could you elaborate more on your approach , I coudn't get your suggestion.
On Fri, May 20, 2016 at 7:56 AM, Sunil Babu <cloudgrp.assist(a)gmail.com> wrote:
Enable cloning with repo an make auto update enabled this there is no need to install
On Thursday, May 19, 2016, Lingesh Mouleeshwaran <lingeshmouleeshwaran(a)gmail.com> wrote:
Hi Cloudfoundry ,
Is there any simple way, we can update or install new libraries in existing cf stacks (cflinuxf2) without creating new custom stacks ??
Example : Our modified java buildpack not running on existing stacks because of few of the ruby gems are missing in the file system. so we would require to install few ruby gem and use the modified java buildpack.
Share your thoughts and suggestions.
Thanks & Regards
Sunil Babu K C