0
votes

Everytime I try to deploy my rails app onto heroku it says

Michael$ heroku create
Creating stormy-window-812..... done, stack is bamboo-mri-1.9.2
http://stormy-window-812.heroku.com/ | [email protected]:stormy-window-812.git

Michael$ git push heroku master

 !  Invalid path.
 !  Syntax is: [email protected]:.git where  is your app's name

fatal: The remote end hung up unexpectedly

I'm not sure what's wrong. I do a normal heroku create and my git is working for github to load code. Is there something I'm missing? The path seems to be the right format so I don't know that the problem is.

6

6 Answers

6
votes

Your .git/config is borked.

Ensure that the remote for heroku points to:

[email protected]:stormy-window-812.git
1
votes

There must be a bit of misstep somewhere in your process, I created a sample app, using the following commands - hopefully this will help you identify where things aren't going right.

Just the list of commands:

$ rails new sample_app
$ cd sample_app/
$ git init
$ git add .
$ git commit -m "Initial commit"
$ heroku create
$ git push heroku master
$ heroku open

And the commands, with some truncated output:

$ rails new sample_app
    create  
    create  README
    create  Rakefile
    create  config.ru
    create  .gitignore
# ..snip..

$ cd sample_app/

$ git init
Initialized empty Git repository in /sample_app/.git/

$ git add .

$ git commit -m "Initial commit"
[master (root-commit) 487a313] Initial commit
 37 files changed, 1138 insertions(+), 0 deletions(-)
 create mode 100644 .gitignore
 create mode 100644 Gemfile
 create mode 100644 Gemfile.lock
 create mode 100644 README
# ..snip..

$ heroku create

$ git push heroku master
Counting objects: 63, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (47/47), done.
Writing objects: 100% (63/63), 24.81 KiB, done.
Total 63 (delta 2), reused 0 (delta 0)

-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Detected Rails is not set to serve static_assets
       Installing rails3_serve_static_assets... done
-----> Configure Rails 3 to disable x-sendfile
       Installing rails3_disable_x_sendfile... done
-----> Configure Rails to log to stdout
       Installing rails_log_stdout... done
-----> Gemfile detected, running Bundler version 1.0.7
        Unresolved dependencies detected; Installing...
        Using --without development:test
        Fetching source index for http://rubygems.org/
        Installing rake (0.9.2) 
        Installing multi_json (1.0.3) 
        Installing activesupport (3.1.0.rc6)
# ..snip..

-----> Compiled slug size is 5.6MB
-----> Launching... done, v4
       http://gentle-water-874.heroku.com deployed to Heroku

To [email protected]:gentle-water-874.git
 * [new branch]      master -> master

$ heroku open
0
votes

I think you need to cd into your app directory. Then do the push again.

Also, make sure you add heroku as your remote then you can try again:

git remote add heroku [email protected]:appname.git

0
votes

I had this problem after renaming my app. If you do
heroku rename newname

you will then have to do
git remote rm heroku
git remote add heroku [email protected]:newname.git

0
votes

My .git/config was clearly dorked - I attempted changing to first_app as shown above (newby: RoR Tutorial chapter 1) several times. Deleting the /.git/config and doing the steps above starting with 'git init' fixed the config: url = [email protected]:dry-eyrie-8108.git

0
votes

It also be as simple as:

  1. $ heroku login
  2. $ heroku git:clone -a appname ( this line right here solved it for me)
  3. $ git add .
  4. $ git commit -am "make it better"
  5. $ git push heroku master