내 모든 파일은 GitHub : https://github.com/Integralist/Passage에서 찾을 수 있습니다 (단지 내가 작업하고있는 것을 볼 필요가 있기 때문에).Heroku에서 작동하는 기본 Ruby/Sinatra 응용 프로그램을 가져올 수 없습니까?
나는 Heroku에 처음 왔고 Sinatra 앱을 업로드하기위한 지침에 따라 시도했지만 실행되지는 않습니다. 앱 URL을 방문하면 일반 "애플리케이션 오류"메시지가 나타납니다.
내 설정 과정과 같이하고있다은 다음과 같습니다
heroku login
heroku create --stack cedar
이 config.ru
파일을 만들고 내용을 추가 ...
require 'app'
run Sinatra::Application
만들기 Gemfile 파일 (파일 확장자 없음)을 추가하고 c ontent ...
source 'http://rubygems.org'
gem 'sinatra', '1.3.2'
gem 'thin', '1.3.1'
열기 터미널 (I 맥 OS X를 실행하는거야) 및 실행 :
bundle install
를 중복 Gemfile하지만 .lock 파일 확장자를 가진이 시간을 생성하기 위해 보인다?
web: bundle exec ruby app.rb -p $PORT
(app.rb 분명히 내 기본 응용 프로그램 파일의 이름입니다) :이 다른 Gemfile 지금
GEM
remote: http://rubygems.org/
specs:
daemons (1.1.8)
eventmachine (0.12.10)
rack (1.4.1)
rack-protection (1.2.0)
rack
sinatra (1.3.2)
rack (~> 1.3, >= 1.3.6)
rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3)
thin (1.3.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
tilt (1.3.3)
PLATFORMS
ruby
DEPENDENCIES
sinatra (= 1.3.2)
thin (= 1.3.1)
그런 다음 나는
Procfile
(어떤 파일 확장자)을 생성하지 않으며 내용을 추가 ... 다음과 같은 내용이있다.
나는 Git을 사용하여 관련된 Heroku 레포에 내 파일을 단계/커밋/푸시합니다.
하지만 heroku ps
을 실행하면 내가 얻을 ...
=== web: `bundle exec ruby app.rb -p`
web.1: crashed for 1m
내가 heroku logs
을 실행하면 그때는 좀 ..
2012-06-09T18:35:41+00:00 heroku[slugc]: Slug compilation started
2012-06-09T18:36:37+00:00 heroku[api]: Add LANG, PATH, RACK_ENV, GEM_PATH config by [email protected]
2012-06-09T18:36:37+00:00 heroku[api]: Release v2 created by [email protected]
2012-06-09T18:36:38+00:00 heroku[api]: Release v3 created by [email protected]
2012-06-09T18:36:38+00:00 heroku[api]: Deploy e26921b by [email protected]
2012-06-09T18:36:38+00:00 heroku[web.1]: State changed from created to starting
2012-06-09T18:36:38+00:00 heroku[slugc]: Slug compilation finished
2012-06-09T18:36:40+00:00 heroku[web.1]: Starting process with command `bundle exec ruby app.rb -p`
2012-06-09T18:36:41+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/main.rb:15:in `<class:Application>': missing argument: -p (OptionParser::MissingArgument)
2012-06-09T18:36:41+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/main.rb:4:in `<module:Sinatra>'
2012-06-09T18:36:41+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/main.rb:3:in `<top (required)>'
2012-06-09T18:36:41+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra.rb:5:in `require'
2012-06-09T18:36:41+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra.rb:5:in `<top (required)>'
2012-06-09T18:36:41+00:00 app[web.1]: from app.rb:12:in `require'
2012-06-09T18:36:41+00:00 app[web.1]: from app.rb:12:in `<main>'
2012-06-09T18:36:42+00:00 heroku[web.1]: Process exited with status 1
2012-06-09T18:36:42+00:00 heroku[web.1]: State changed from starting to crashed
2012-06-09T18:36:42+00:00 heroku[web.1]: State changed from crashed to created
2012-06-09T18:36:42+00:00 heroku[web.1]: State changed from created to starting
2012-06-09T18:36:44+00:00 heroku[web.1]: Starting process with command `bundle exec ruby app.rb -p`
2012-06-09T18:36:45+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/main.rb:15:in `<class:Application>': missing argument: -p (OptionParser::MissingArgument)
2012-06-09T18:36:45+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/main.rb:4:in `<module:Sinatra>'
2012-06-09T18:36:45+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/main.rb:3:in `<top (required)>'
2012-06-09T18:36:45+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra.rb:5:in `require'
2012-06-09T18:36:45+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra.rb:5:in `<top (required)>'
2012-06-09T18:36:45+00:00 app[web.1]: from app.rb:12:in `require'
2012-06-09T18:36:45+00:00 app[web.1]: from app.rb:12:in `<main>'
2012-06-09T18:36:47+00:00 heroku[web.1]: Process exited with status 1
2012-06-09T18:36:47+00:00 heroku[web.1]: State changed from starting to crashed
2012-06-09T18:42:09+00:00 heroku[router]: Error H10 (App crashed) -> GET furious-wind-9309.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
2012-06-09T18:42:09+00:00 heroku[router]: Error H10 (App crashed) -> GET furious-wind-9309.herokuapp.com/favicon.ico dyno= queue= wait= service= status=503 bytes=
2012-06-09T18:42:38+00:00 heroku[router]: Error H10 (App crashed) -> GET furious-wind-9309.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
2012-06-09T18:42:39+00:00 heroku[router]: Error H10 (App crashed) -> GET furious-wind-9309.herokuapp.com/favicon.ico dyno= queue= wait= service= status=503 bytes=
사람이 문제가 무엇인지 설명 할 수 어떻게 내가 할 수있는 제발 고쳐주세요.
감사합니다.
'app.rb'에 무엇이 있습니까? 'Procfile'을 사용하고 있기 때문에,'config.ru'는 서버를 초기화하지 않습니다.'app.rb'는 ('ruby app.rb' 명령으로)입니다. – redhotvengeance