私の Windows 8 デスクトップ (rails_12factor、ruby 1.9.3、rails 4、postgres) で動作する基本的な Rails アプリケーションがありますrails server
。
アプリケーションをheroku経由でプッシュするgit push heroku master
と、すべてうまくいくようです。表示される唯一の警告は、「Gemfile.lock
Windows で生成されたため削除しています」です。プロセスは次のメッセージで終了します - 「Launching... done, v9」。
ただし、「heroku ps」を実行すると、次のようになります。
=== web (1X): bin/rails server -p $PORT -e $RAILS_ENV
web.1: クラッシュしました 2013/07/12 00:42:20 (~ 4 秒前)
heroku logs --tail を実行すると、ログ ファイルで次の内容が繰り返されます - :
heroku[web.1]: Starting process with command `bin/rails server -p 16041 -e $RAILS_ENV`
app[web.1]: /usr/bin/env: ruby.exe: No such file or directory
heroku[web.1]: Process exited with status 127
heroku[web.1]: State changed from starting to crashed
heroku[web.1]: Error R99 (Platform error) -> Failed to launch the dyno within 10 seconds
heroku[web.1]: Stopping process with SIGKILL
...
heroku[web.1]: Process exited with status 127
heroku[web.1]: Error R99 (Platform error) -> Failed to launch the dyno within 10 seconds
Web で .gitignore をチェックして、ローカルの bin フォルダーの内容が除外されているかどうかを確認するものを見ました。ではない。また、bin フォルダーの内容を編集し、ruby の後にある .exe という単語を削除するという提案も見ました - 私もそれを試しました。
編集 1: 私のプロジェクトにはサブフォルダー bin があり、3 つのファイル bundle、rail、rake があります。これらは #!/usr/bin/env ruby で始まるファイルのみです。また、最初の行を #!/usr/bin/env ruby .exe * に編集しました - エラーはまだ見られました。各ファイルの内容は次のとおりです。
バンドル
#!/usr/bin/env ruby
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
load Gem.bin_path('bundler', 'bundle')
レール
#!/usr/bin/env ruby
APP_PATH = File.expand_path('../../config/application', __FILE__)
require_relative '../config/boot'
require 'rails/commands'
レーキ
#!/usr/bin/env ruby
require_relative '../config/boot'
require 'rake'
Rake.application.run