0

After extensive research on SO and other Googling, I am not able to figure out why I am getting the following error:

remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Failed to detect set buildpack {{path_to}}/buildpacks/heroku/ruby
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote: 
remote:  !     Push failed
remote: Verifying deploy....
remote: 
remote: ! Push rejected to nert-forum.
remote: 
To {{my heroku git repository}}
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to {{my heroku git repository}}

I have followed the guides here: https://devcenter.heroku.com/articles/getting-started-with-rails..

Specifically clearing and setting the desired buildpack as described here: https://devcenter.heroku.com/articles/buildpacks#detection-failure

Checking buildpacks in CL shows that it exists:

> heroku buildpacks
=== nert-forum Buildpack URL
heroku/ruby

More details:

  • I am pushing from my master branch

  • My branch is up to date and committed

  • The directory I am pushing from has a Gemfile in it

My Gemfile contains (amongst other things):

gem 'rails', '~> 5.0.0', '>= 5.0.0.1'
gem 'pg'
ruby '2.3.0'

Let me know if you need me to provide more information. Any help would be appreciated.

Lily Brown
  • 13
  • 6

1 Answers1

0

This turned out to be a nested repository issue. The directory I was pushing from did indeed have a Gemfile and the Rails project within it, but the Git repository (of the same name) was a level above this.

I solved the issue by using the command:

git subtree push --prefix output heroku master

This is the post that helped me out with this: How can I deploy/push only a subdirectory of my git repo to Heroku?

Community
  • 1
  • 1
Lily Brown
  • 13
  • 6