2013-01-10 25 views
7

Khi tôi git đẩy vào heroku, tôi nhận được lỗi này fatal: Not a git repository (or any of the parent directories): .git nhiều lần. Tất cả mọi thứ hoạt động tốt trong ứng dụng của tôi và đẩy hoàn thành bình thường. Tôi tự hỏi tại sao điều này lại xảy ra. Tôi cũng thấy cùng một thông báo 4-5 lần trong nhật ký của tôi trong heroku, khi tác vụ lên lịch chạy. Bất kỳ ý tưởng nào? Cảm ơn!fatal: Not a git repository ... thông báo lỗi

git push staging master 

Counting objects: 41, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (21/21), done. 
Writing objects: 100% (21/21), 1.74 KiB, done. 
Total 21 (delta 20), reused 0 (delta 0) 
-----> Ruby/Rails app detected 
-----> Installing dependencies using Bundler version 1.3.0.pre.5 
     Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment 
     fatal: Not a git repository (or any of the parent directories): .git 
     fatal: Not a git repository (or any of the parent directories): .git 
     fatal: Not a git repository (or any of the parent directories): .git 
     Fetching gem metadata from https://rubygems.org/.......... 
     Fetching gem metadata from https://rubygems.org/.. 
     Using rake (10.0.3) 
     Using i18n (0.6.1) 
     Using multi_json (1.5.0) 
     Using builder (3.0.4) 
     Using erubis (2.7.0) 
     Using journey (1.0.4) 
     Using rack-cache (1.2) 
     Using rack-test (0.6.2) 
     Using jquery-rails (2.0.2) 
     Using backbone-on-rails (0.9.2.1) 
     Using bcrypt-ruby (3.0.1) 
     Using sass (3.2.1) 
     Using cancan (1.6.7) 
     Using carrierwave (0.6.2) from git://github.com/jnicklas/carrierwave.git (at master) 
     Using chosen-rails (0.9.8) 
     Using coffee-rails (3.2.2) 
     Using commonjs (0.2.6) 
     Using orm_adapter (0.3.0) 
      ....... 

     Using warden (1.2.1) 
     Using devise (2.1.2) 
     Using nokogiri (1.5.4) 
     Using ruby-hmac (0.4.0) 
     Using fog (1.3.1) 
     Using gmaps4rails (1.5.5) 
     Using jquery-datatables-rails (1.10.0) 
     Using jquery-fileupload-rails (0.3.4) 
     Using jquery-ui-rails (2.0.2) 
     Using less (2.2.2) 
     Using less-rails (2.2.6) 
     Using bundler (1.3.0.pre.5) 
     Using rails (3.2.11) 
     Using newrelic_rpm (3.5.3.25) 
     Using paper_trail (2.6.3) 
     Using pg (0.13.2) 
     Using sass-rails (3.2.5) 
     Using simple_form (2.0.2) 
     Using squeel (1.0.11) 
     Using strong_parameters (0.1.5) 
     Using therubyracer (0.10.2) 
     Using twitter-bootstrap-rails (2.1.9) 
     Using uglifier (1.2.5) 
     Using validate_email (0.1.5) 
     Using validate_url (0.2.0) 
     Your bundle is complete! It was installed into ./vendor/bundle 
     Cleaning up the bundler cache. 
fatal: Not a git repository (or any of the parent directories): .git 
fatal: Not a git repository (or any of the parent directories): .git 
fatal: Not a git repository (or any of the parent directories): .git 
-----> Writing config/database.yml to read from DATABASE_URL 
-----> Preparing app for Rails asset pipeline 
     Running: rake assets:precompile 
     fatal: Not a git repository (or any of the parent directories): .git 
     fatal: Not a git repository (or any of the parent directories): .git 
     fatal: Not a git repository (or any of the parent directories): .git 
     fatal: Not a git repository (or any of the parent directories): .git 
     fatal: Not a git repository (or any of the parent directories): .git 
     fatal: Not a git repository (or any of the parent directories): .git 
     fatal: Not a git repository (or any of the parent directories): .git 
     fatal: Not a git repository (or any of the parent directories): .git 
     fatal: Not a git repository (or any of the parent directories): .git 
     Asset precompilation completed (274.30s) 
-----> Rails plugin injection 
     Injecting rails_log_stdout 
     Injecting rails3_serve_static_assets 
-----> Discovering process types 
     Procfile declares types  -> (none) 
     Default types for Ruby/Rails -> console, rake, web, worker 
-----> Compiled slug size: 31.8MB 
-----> Launching... done, v22 
     http://***************-staging.herokuapp.com deployed to Heroku 

Trả lời

1

Bạn cần phải làm một git init trong dự án của bạn để khởi tạo một kho git. Bạn có thể xem cấu hình heroku trong liên kết sau git remote doesn't seem to be working at all.

+2

Tôi đã có một repo địa phương và nhiều cam kết đã (được lưu trữ trong github cũng), trước khi tôi đẩy để repo từ xa của Heroku. – stefkas

+0

Bạn có sử dụng gemspeck không? Dường như nó có thể gây ra vấn đề bạn có thể thấy trong https://github.com/heroku/heroku-buildpack-ruby/issues/3 –

+0

Cảm ơn William, tôi đã nhìn thấy thông báo này từ trau dồi, nhưng tôi không sử dụng 'gemspec' và tôi không tìm thấy bất kỳ tập tin được tạo tự động' gemspec' nào. Nó phải là một cái gì đó khác. – stefkas

1

Điều này thực sự rất trễ nhưng bạn nên thử điều này:

heroku labs:enable user-env-compile 

chạy trong giao diện điều khiển và sau đó cập nhật repo của bạn. Sau đó đẩy đến github ... Sau đó đẩy vào heroku. Chúc may mắn

Các vấn đề liên quan