Static website on Heroku Cedar
Asked Answered
P

2

8

I tried following the instructions here in order to create a static website on Heroku's Cedar stack.

I have put the site up here.

When I try to push the app (using "git push heroku master"), I get the following error:

Kushs-MacBook-Air:hgtr kushpatel$ git push heroku master
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 1.29 KiB, done.
Total 7 (delta 1), reused 0 (delta 0)

-----> Heroku receiving push
-----> Removing .DS_Store files
 !     Heroku push rejected, no Cedar-supported app detected

To [email protected]:gentle-warrior-1301.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:gentle-warrior-1301.git'

Any help is greatly appreciated. I am on the latest ruby/rack/heroku

Philippi answered 5/2, 2012 at 8:16 Comment(0)
K
16

The instructions are for Bamboo stack which would have had Rack installed - the Cedar stack is entirely empty so you need to have rack installed.

You need to add a Gemfile with

source :rubygems

gem 'rack'

bundle it and then add the Gemfile and Gemfile.lock to git and repush.

Kelton answered 5/2, 2012 at 9:18 Comment(0)
W
0

Those instructions are for the Bamboo stack.

The cedar stack needs a Procfile to be able to identify how to run your app.

Something like this in your Procfile should do the trick - assuming you're using thin:

web: bundle exec thin start -p $PORT -e $RACK_ENV
Wench answered 5/2, 2012 at 8:40 Comment(2)
Procfiles aren't used to detect the app types - config.ru is sufficient. They will automatically run a web process for you.Kelton
Ah, well said. Completely forgot about that. TksWench

© 2022 - 2024 — McMap. All rights reserved.