gregburek / heroku-buildpack-toolbelt

DEPRECATED use https://github.com/heroku/heroku-buildpack-cli
MIT License
10 stars 28 forks source link

Usage unclear for non-Ruby users #11

Open AGSPhoenix opened 9 years ago

AGSPhoenix commented 9 years ago

I'm trying to get a Python app working on Heroku, and it needs access to the Toolbelt. Unfortunately, the slug compilation fails when it gets to Ruby, which I suspect is because I don't have a Gemfile. Trying to make a minimal one that just specifies a Ruby version results in an error message about not having a Gemfile.lock, which I don't know how to make, and I don't want to install Bundler and a bunch of Ruby stuff just to make one.

Is there some minimal set of files I can add to my repository to get Ruby and the Toolbelt to just work?

gregburek commented 9 years ago

Can you please be more specific what your app is doing with the toolbelt? Other than pgbackups, I am curious as to what is missing from the API.

Try using as your .buildpacks file:

https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/ruby.tgz
https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/python.tgz
https://github.com/gregburek/heroku-buildpack-toolbelt.git
AGSPhoenix commented 9 years ago

Can you please be more specific what your app is doing with the toolbelt?

So far, nothing. The Ruby buildpack aborts compilation because I have no Ruby dependencies specified (I think). With the .buildpacks file you specified:

No Gemfile:

$ git push
[snip]

-----> Fetching custom git buildpack... done
-----> Multipack app detected
=====> Downloading Buildpack: https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/ruby.tgz

 !     Push rejected, failed to compile Multipack app

With the following Gemfile:

source "https://rubygems.org"
ruby '2.1.4'

...and no Gemfile.lock

-----> Fetching custom git buildpack... done
-----> Multipack app detected
=====> Downloading Buildpack: https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/ruby.tgz
=====> Detected Framework: Ruby
-----> Compiling Ruby/NoLockfile
 !
 !     Gemfile.lock required. Please check it in.
 !

 !     Push rejected, failed to compile Multipack app
gregburek commented 9 years ago

I was trying to ask why you are using the buildpack at all. What things are not provided in heroku.py that you will need in this app?

Try to delete the Ruby buildpack and push again. This buildpack should be able to use system Ruby.

On Sat, Nov 15, 2014 at 3:07 AM, AGSPhoenix notifications@github.com wrote:

Can you please be more specific what your app is doing with the toolbelt? So far, nothing. The Ruby buildpack aborts compilation because I have no Ruby dependencies specified (I think). With the .buildpacks file you specified: No Gemfile:

$ git push
[snip]
-----> Fetching custom git buildpack... done
-----> Multipack app detected
=====> Downloading Buildpack: https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/ruby.tgz
 !     Push rejected, failed to compile Multipack app

With the following Gemfile:

source "https://rubygems.org"
ruby '2.1.4'

...and no Gemfile.lock

-----> Fetching custom git buildpack... done
-----> Multipack app detected
=====> Downloading Buildpack: https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/ruby.tgz
=====> Detected Framework: Ruby
-----> Compiling Ruby/NoLockfile
 !
 !     Gemfile.lock required. Please check it in.
 !
 !     Push rejected, failed to compile Multipack app

Reply to this email directly or view it on GitHub: https://github.com/gregburek/heroku-buildpack-toolbelt/issues/11#issuecomment-63168726

AGSPhoenix commented 9 years ago

Wow, that wrapper is not mentioned anywhere (or at least anywhere obvious) in the documentation on the main Heroku site. There's such an emphasis on the command line that I assumed it to be the intended way to interact with the service.

Try to delete the Ruby buildpack and push again. This buildpack should be able to use system Ruby.

Sure enough, it works without the Ruby buildpack. I wouldn't have expected the base system to include Ruby, since it's a waste of space for the many apps that don't need it, and the .buildpacks file in the readme including it only cemented that belief. Thanks for clearing up the confusion.

Maybe you could update the readme to guide poor confused idiots like me on their way? I'm not sure what would be best, but a line like 'for languages without existing API wrappers' might have saved me quite a bit of time.

Regardless, I'm going to be sending some grumpy feedback to Heroku about the fact that I found out they had an official API wrapper, not through days of looking at the official documentation, but because some random guy on the internet told me about it.

I'll leave this issue open since I think you should update the readme, but if you think it's unlikely others will encounter the same problem, feel free to close it.

gregburek commented 9 years ago

Yeah, we try to emphasize The Heroku API, but it is advanced stuff that we don't make as readily available as the cli, which is already pretty hard for all users to use. The addition of v2 and v3 API clients makes it even harder.

This buildpack is primarily for pgbackups commands which are a private API and are being phased out. Please open issues on the various language specific clients if you run into something not well defined or supported. I'll add a further note that this buildpack is for a specific purpose. Thanks!