0

I'm attempting to migrate an existing Core Data (with local store) project to Heroku using AFIncrementalStore and the Core Data Buildpack, but pushing to Heroku keeps failing.

The primary differences between my app setup and that in the aforelinked tutorial:

  • I've set up the Xcode workspace with the AFNetworking/AFIncremental dependencies, but not actually changed any code yet.

  • The directory containing the Xcode project/workspace files is one level down from the root of my git repo. This means heroku create --buildpack git://github.com/mattt/heroku-buildpack-core-data.git fails to create the git remote named heroku, but I can cd .. and heroku git:remote -a appname and that seems to be cool.

  • I'm working on a branch other than master in my git repo, so when I push to Heroku I need to use git push heroku my_local_branch:master.

However, that git push doesn't get anywhere, not even into the Core Data Buildpack stuff (as far as I can tell):

-----> Fetching custom git buildpack... done
 !     Heroku push rejected, no Cedar-supported app detected

To git@heroku.com:appname.git
 ! [remote rejected] my_local_branch -> master (pre-receive hook declined)
rickster
  • 124,678
  • 26
  • 272
  • 326
  • Have you tried any of the suggestions here: http://stackoverflow.com/a/12086925/334934 – MishieMoo Apr 06 '13 at 00:34
  • AFAICT, those and most of the other answers for questions involving this error require certain files from a Rails (or PHP, or whatever) app to *already exist* in the repo I'm pushing to Heroku. The Core Data buildpack, on the other hand, is apparently supposed to *create* them. But it looks like it doesn't get to that point before this error comes up, because otherwise we'd see some of the logging from [the buildpack scripts](https://github.com/mattt/heroku-buildpack-core-data/blob/master/bin/compile). – rickster Apr 06 '13 at 04:03

2 Answers2

1

I just went through one of my projects and arranged it to mimic yours.

The buildpack will fail if the .xcdatamodeld isn't within 1 folder level of root. I suggest filing an issue on Github.

MishieMoo
  • 6,620
  • 2
  • 25
  • 35
0

When you created the Heroku app, maybe you didn't pass in the --buildpack parameter. You can check by running heroku config and verify there's a BUILDPACK_URL setting pointing at the buildpack repo. If that's missing, you can add it:

heroku config:add BUILDPACK_URL=https://github.com/some/buildpack.git -a myapp

Documentation here.

friism
  • 19,068
  • 5
  • 80
  • 116
  • Nope. It echoed `BUILDPACK_URL=git://github.com/mattt/heroku-buildpack-core-data.git` when I ran `heroku create ...`, and shows it when I check `heroku config`. – rickster Apr 05 '13 at 22:38
  • Hm, does your source code match what's looked for in the detect script? https://github.com/mattt/heroku-buildpack-core-data/blob/master/bin/detect – friism Apr 05 '13 at 23:13
  • Yes... sort of. It does have an `xcdatamodel` somewhere inside, though I don't trust that `ls $1/**/*.xcdatamodel*` will work for finding it. (Isn't `**` only available on versions of `bash` newer than ship with OS X 10.8.x?) However, if this test were failing, I should be seeing the error from that script, "No Core Data model detected", not (or before) "no Cedar-supported app detected", right? – rickster Apr 06 '13 at 03:49