【问题标题】:Invalid path in HerokuHeroku 中的路径无效
【发布时间】:2011-11-07 07:08:20
【问题描述】:

每次我尝试将我的 rails 应用程序部署到 heroku 上时都会显示

迈克尔$ heroku创建 创建stormy-window-812.....完成,堆栈是bamboo-mri-1.9.2 http://stormy-window-812.heroku.com/ | git@heroku.com:stormy-window-812.git Michael$ git push heroku master !路径无效。 !语法是:git@heroku.com:.git 你的应用程序的名字在哪里 致命:远端意外挂断

我不确定出了什么问题。我做了一个普通的 heroku create,我的 git 正在为 github 加载代码。有什么我想念的吗?路径似乎是正确的格式,所以我不知道问题出在哪里。

【问题讨论】:

    标签: ruby-on-rails ruby ruby-on-rails-3 heroku


    【解决方案1】:

    也可以这么简单:

    1. $ heroku 登录
    2. $ heroku git:clone -a appname(这一行在这里为我解决了)
    3. $ git add .
    4. $ git commit -am “让它变得更好”
    5. $ git push heroku master

    【讨论】:

      【解决方案2】:

      我的 .git/config 显然是笨拙的 - 我尝试多次更改为 first_app,如上所示(新手:RoR 教程第 1 章)。删除 /.git/config 并从 'git init' 开始执行上述步骤修复了配置: url = git@heroku.com:dry-eyrie-8108.git

      【讨论】:

        【解决方案3】:

        重命名我的应用后,我遇到了这个问题。如果你这样做
        heroku rename newname

        然后你必须这样做
        git remote rm heroku
        git remote add heroku git@heroku.com:newname.git

        【讨论】:

          【解决方案4】:

          你的.git/config 被打断了。

          确保 heroku 的遥控器指向:

          git@heroku.com:stormy-window-812.git
          

          【讨论】:

            【解决方案5】:

            您的流程中一定有一些失误,我创建了一个示例应用程序,使用以下命令 - 希望这将帮助您确定哪里出了问题。

            只是命令列表:

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

            还有一些命令,有一些截断的输出:

            $ 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 git@heroku.com:gentle-water-874.git
             * [new branch]      master -> master
            
            $ heroku open
            

            【讨论】:

            • 工作不完全确定我做错了什么,但非常感谢您的帮助
            • 嗨,我遇到了同样的问题,但我试图使用 capistrano 将我的网站从 heroku 移动到我自己的服务器。在我的 git 中删除 heroku 之后,它只会阻止我 cap deploy:setup,并继续希望我去 heroku
            【解决方案6】:

            我认为你需要 cd 进入你的应用目录。然后再次推动。

            另外,请确保将 heroku 添加为遥控器,然后再试一次:

            git remote add heroku git@heroku.com:appname.git

            【讨论】:

            • 我 cd 进入目录,我尝试了你所做的,但它没有工作它说 dhcp-10-189-67-51:sample_app Michael$ git push heroku master !路径无效。 !语法是: git@heroku.com:.git 其中 是您的应用程序名称 致命:当您说出应用程序名称时,远程端意外挂断 我假设您的意思是他们分配的愤怒的秋天名称?任何其他想法可能是什么问题?
            猜你喜欢
            • 1970-01-01
            • 2014-08-21
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 2012-04-12
            • 2017-07-11
            • 1970-01-01
            • 2018-08-11
            相关资源
            最近更新 更多