2016-07-28 7 views
1

gitでいくつかのルビコードをプッシュしようとしていて、途中で止まってしまいました。ここに私のセットアップとエラーが、私はまだgitののインとアウトを理解しようとしていますが、私はかなりgitのは私のコンパイルフォルダ内のファイル拡張子を認識しない理由として失われています..私は取得Herokuデプロイエラー:デフォルト言語なし

[email protected]:~/ruby# git remote -v 
heroku https://git.heroku.com/warm-woodland-27175.git (fetch) 
heroku https://git.heroku.com/warm-woodland-27175.git (push) 
[email protected]:~/ruby# ls 
config.ru myapp.rb 
[email protected]:~/ruby# git push heroku master 
Counting objects: 4, done. 
Compressing objects: 100% (3/3), done. 
Writing objects: 100% (4/4), 398 bytes | 0 bytes/s, done. 
Total 4 (delta 0), reused 0 (delta 0) 
remote: Compressing source files... done. 
remote: Building source: 
remote: 
remote: !  No default language could be detected for this app. 
remote:       HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically. 
remote:       See https://devcenter.heroku.com/articles/buildpacks 
remote: 
remote: !  Push failed 
remote: Verifying deploy... 
remote: 
remote: !  Push rejected to warm-woodland-27175. 
remote: 
To https://git.heroku.com/warm-woodland-27175.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to 'https://git.heroku.com/warm-woodland- 27175.git' 
[email protected]:~/ruby# 

です。私はどの言語をどのように使用するか、.rb .plなどを取り出す方法だと思っていました。どんな助けでも大歓迎です。

答えて

3

SinatraアプリをHerokuにデプロイしようとしたときにこのエラーが発生しました。

heroku buildpacks:set heroku/ruby 

私は解決策を完了するのに役立つhttps://devcenter.heroku.com/articles/buildpacksを読んだ。

しかし、私は私はあなたがbundle installを行うことを確認してくださいなどGemfileような追加する必要があるファイルを理解する助けhttps://devcenter.heroku.com/articles/rack から始まりました。

ので

git add . 

またはものは何でも

git commit -m "Added files for Heroku deployment" 

をコミットするか、あなたが好きなメッセージを変更し、それを実行する必要があるなど、あなたがGemfileを追加した後、あなたの変更をコミットしていることを確認します。その後、私はちょうどコメントで私に尋ねる、あなたが必要とする何かが欠けていた場合は今、私は私のサイトには、Herokuのに

enter image description here

enter image description here

を使用して実行している

git push heroku master 

を使用して展開することができます明確にすることができます。

1

Ruby SinatraでHerokuにデプロイしようとしていたときに同じ問題が発生しました。私の場合の問題は、私がRubyとSinatraにまったく新しいものであり、宝石とバンドリングについて何も知らなかったことです。

文字通り、フォルダ内にapp.rbファイルしかありませんでした。 は、私はいくつかのガイドをもとに、次の手順を取っ1私が読んで:

私のアプリがapp.rb呼び出された場合、config.ruという名前のファイルを作成:

require './hello' 
run Sinatra::Application 

Gemfileと呼ばれるファイルを作成します。

source 'https://rubygems.org' 
gem 'sinatra' 

その後、私はbundle installを実行する必要があることを思い出したthis articleを見つけました。

次に、これらのファイルをgitに追加してプッシュして、私の作業中です!

関連する問題