将应用程序推送到heroku时:“致命:不是git存储库”,加上可疑的Gemfile更改

发布于 2024-12-01 18:49:13 字数 2350 浏览 0 评论 0原文

我正在尝试将其推送到heroku https://github.com/gunark/rubycas-server

我跑了:

git clone https://github.com/gunark/rubycas-server
bundle install
heroku create
git heroku push master

但我收到以下错误。我似乎无法理解他们。有什么想法吗? 它说这不是 git repo,但是。还有正常的 .git 目录等。

$ git push heroku master
Counting objects: 3563, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1031/1031), done.
Writing objects: 100% (3563/3563), 686.53 KiB, done.
Total 3563 (delta 2451), reused 3530 (delta 2421)

-----> Heroku receiving push
-----> Ruby/Rack app detected
-----> Gemfile detected, running Bundler version 1.0.7
       Unresolved dependencies detected; Installing...
       Using --without development:test
       fatal: Not a git repository (or any of the parent directories): .git
       You have modified your Gemfile in development but did not check
       the resulting snapshot (Gemfile.lock) into version control

       You have added to the Gemfile:
       * source: source at /disk1/tmp/build_1db9pppnx0kzj
       * activerecord (~> 2.3.12)
       * activesupport (~> 2.3.12)
       * sinatra (~> 1.0)
       * gettext (~> 2.1.0)
       * crypt-isaac (~> 0.9.1)

       You have deleted from the Gemfile:
       * source: source at .

       You have changed in the Gemfile:
       * rubycas-server from `source at /disk1/tmp/build_1db9pppnx0kzj` to `no specified source`
       FAILED: http://devcenter.heroku.com/articles/bundler
 ! Heroku push rejected, failed to install gems via Bundler

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

更新: 这是 Quynh Nguyen 建议的结果:

$ git init
Reinitialized existing Git repository in /Users/mm/Documents/Development/thirdparty/rubycas_server/.git/
$ git add .
$ git status
On branch master
nothing to commit (working directory clean)

I'm trying to push this to heroku https://github.com/gunark/rubycas-server

I ran:

git clone https://github.com/gunark/rubycas-server
bundle install
heroku create
git heroku push master

But I'm getting the following errors. I can't seem to make sense of them. Any ideas?
It says it's not a git repo but. And there's the normal .git directory, etc.

$ git push heroku master
Counting objects: 3563, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1031/1031), done.
Writing objects: 100% (3563/3563), 686.53 KiB, done.
Total 3563 (delta 2451), reused 3530 (delta 2421)

-----> Heroku receiving push
-----> Ruby/Rack app detected
-----> Gemfile detected, running Bundler version 1.0.7
       Unresolved dependencies detected; Installing...
       Using --without development:test
       fatal: Not a git repository (or any of the parent directories): .git
       You have modified your Gemfile in development but did not check
       the resulting snapshot (Gemfile.lock) into version control

       You have added to the Gemfile:
       * source: source at /disk1/tmp/build_1db9pppnx0kzj
       * activerecord (~> 2.3.12)
       * activesupport (~> 2.3.12)
       * sinatra (~> 1.0)
       * gettext (~> 2.1.0)
       * crypt-isaac (~> 0.9.1)

       You have deleted from the Gemfile:
       * source: source at .

       You have changed in the Gemfile:
       * rubycas-server from `source at /disk1/tmp/build_1db9pppnx0kzj` to `no specified source`
       FAILED: http://devcenter.heroku.com/articles/bundler
 ! Heroku push rejected, failed to install gems via Bundler

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

UPDATE: Here's the result of Quynh Nguyen's suggestion:

$ git init
Reinitialized existing Git repository in /Users/mm/Documents/Development/thirdparty/rubycas_server/.git/
$ git add .
$ git status
On branch master
nothing to commit (working directory clean)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不知在何时 2024-12-08 18:49:13

看起来您需要运行捆绑程序。

bundle install
git add .
git commit -m "Run bundler"
git push heroku master

Looks like you need to run bundler.

Do

bundle install
git add .
git commit -m "Run bundler"
git push heroku master
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文