Skip to content

Instantly share code, notes, and snippets.

@eiwe
Created February 29, 2012 03:00
Show Gist options
  • Save eiwe/1937235 to your computer and use it in GitHub Desktop.
Save eiwe/1937235 to your computer and use it in GitHub Desktop.
Heroku commit issues
eiwe@aries:~/projects/rubylearning/day9/about$ pwd
/home/eiwe/projects/rubylearning/day9/about
eiwe@aries:~/projects/rubylearning/day9/about$ ls
config.ru public
eiwe@aries:~/projects/rubylearning/day9/about$ cat config.ru
use Rack::Static,
:urls => ["/stylesheets", "/images"],
:root => "public"
run lambda { |env|
[
200,
{
'Content-Type' => 'text/html',
'Cache-Control' => 'public, max-age=86400'
},
File.open('public/index.html', File::RDONLY)
]
}
eiwe@aries:~/projects/rubylearning/day9/about$ git add .
eiwe@aries:~/projects/rubylearning/day9/about$ git commit -m "First commit to Heroku"
[master 65d0178] First commit to Heroku
3 files changed, 319 insertions(+), 0 deletions(-)
create mode 100644 day9/about/config.ru
create mode 100644 day9/about/public/index.html
create mode 100644 day9/about/public/stylesheets/about.css
eiwe@aries:~/projects/rubylearning/day9/about$ heroku create
Creating blazing-dawn-9003... done, stack is bamboo-mri-1.9.2
http://blazing-dawn-9003.heroku.com/ | [email protected]:blazing-dawn-9003.git
eiwe@aries:~/projects/rubylearning/day9/about$ # *** Hmm... No message "Git remote heroku added" ??? ***
eiwe@aries:~/projects/rubylearning/day9/about$ git remote add heroku [email protected]:blazing-dawn-9003.git
eiwe@aries:~/projects/rubylearning/day9/about$ git push heroku master
Counting objects: 75, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (60/60), done.
Writing objects: 100% (75/75), 42.30 KiB, done.
Total 75 (delta 17), reused 0 (delta 0)
-----> Heroku receiving push
! Heroku push rejected, no Rails or Rack app detected
To [email protected]:blazing-dawn-9003.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:blazing-dawn-9003.git'
eiwe@aries:~/projects/rubylearning/day9/about$
@eiwe
Copy link
Author

eiwe commented Feb 29, 2012

The problem here ended up being that I was attempting to do the push from from inside the about directory. Heroku wants the config.ru in the parent of that and the push to be done from that directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment