我的应用程序在本地工作使它崩溃在heroku

时间:2016-03-31 16:45:50

标签: ruby-on-rails ruby heroku

我是Ruby on Rails的新手,但我能够在Heroku上传其他应用程序。但是一直试图运行这个,我无法弄清楚发生了什么。

我的回购www.github.com/pocasluces/LibreTeka-from-BookShare

当我推送到heroku时,一切看起来都有效,但当我转到URL时,它会显示错误"应用程序错误。应用程序中发生错误,无法提供您的页面。请稍后重试。如果您是应用程序所有者,请查看日志以获取详细信息"。如你所见。

bool returnBool =  Expression.Lambda<Func<bool>>(finalExpression).Compile()();

Heroku日志显示以下错误:

-----> Using set buildpack heroku/ruby
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.1.5
-----> Installing dependencies using bundler 1.11.2
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
   Using rake 11.1.1
   Using i18n 0.7.0
   Using json 1.8.3
   Using minitest 5.8.4
   Using thread_safe 0.3.5
   Using builder 3.2.2
   Using erubis 2.7.0
   Using mini_portile2 2.0.0
   Using rack 1.6.4
   Using mime-types 2.99.1
   Using arel 6.0.3
   Using request_store 1.3.0
   Using ffi 1.9.10
   Using concurrent-ruby 1.0.1
   Using dynamic_form 1.1.4
   Using tilt 2.0.2
   Using httpclient 2.7.1
   Using isbn 2.0.10
   Using json_pure 1.8.3
   Using pg 0.18.4
   Using bundler 1.11.2
   Using thor 0.19.1
   Using rails_serve_static_assets 0.0.5
   Using rails_stdout_logging 0.0.5
   Using texticle 1.0.4.20101004123327
   Using tzinfo 1.2.2
   Using nokogiri 1.6.7.2
   Using mail 2.6.3
   Using rack-test 0.6.3
   Using sprockets 3.5.2
   Using ffi-compiler 0.1.3
   Using haml 4.0.7
   Using rails_12factor 0.0.3
   Using activesupport 4.2.6
   Using loofah 2.0.3
   Using scrypt 2.1.1
   Using rails-deprecated_sanitizer 1.0.3
   Using globalid 0.3.6
   Using activemodel 4.2.6
   Using rails-html-sanitizer 1.0.3
   Using rails-dom-testing 1.0.7
   Using activerecord 4.2.6
   Using protected_attributes 1.1.3
   Using activejob 4.2.6
   Using actionview 4.2.6
   Using authlogic 3.4.6
   Using isbn_validation 1.2.2
   Using actionpack 4.2.6
   Using actionmailer 4.2.6
   Using railties 4.2.6
   Using sprockets-rails 3.0.4
   Using rails 4.2.6
   Using rails3-generators 1.0.0
   Using themes_for_rails 0.5.1
   Bundle complete! 15 Gemfile dependencies, 54 gems now installed.
   Gems in the groups development and test were not installed.
   Bundled gems are installed into ./vendor/bundle.
   Bundle completed (0.38s)
   Cleaning up the bundler cache.
   Detected manifest file, assuming assets were compiled locally
-----> Discovering process types
   Procfile declares types     -> web
   Default types for buildpack -> console, rake, worker
-----> Compressing...
   Done: 29.4M
-----> Launching...
   Released v20
   https://libre-teka.herokuapp.com/ deployed to Heroku

2016-03-31T18:31:06.971531+00:00 heroku[web.1]: State changed from crashed to starting 2016-03-31T18:31:10.042084+00:00 heroku[web.1]: Starting process with command `bundle exec rails server thin -p 58311 -e production` 2016-03-31T18:31:15.453858+00:00 app[web.1]: /app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- thin (LoadError) 2016-03-31T18:31:15.453884+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require' 2016-03-31T18:31:15.453886+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency' 2016-03-31T18:31:15.453886+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require' 2016-03-31T18:31:15.453903+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:80:in `block in server' 2016-03-31T18:31:15.453899+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/handler.rb:20:in `const_get' 2016-03-31T18:31:15.453893+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/handler/thin.rb:1:in `<top (required)>' 2016-03-31T18:31:15.453899+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/handler.rb:20:in `block in get' 2016-03-31T18:31:15.453903+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/commands/server.rb:75:in `start' 2016-03-31T18:31:15.453900+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/handler.rb:20:in `inject' 2016-03-31T18:31:15.453900+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/handler.rb:20:in `each' 2016-03-31T18:31:15.453902+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/server.rb:290:in `server' 2016-03-31T18:31:15.453902+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/commands/server.rb:125:in `print_boot_information' 2016-03-31T18:31:15.453901+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/handler.rb:20:in `get' 2016-03-31T18:31:15.453904+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `tap' 2016-03-31T18:31:15.453904+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `server' 2016-03-31T18:31:15.453905+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!' 2016-03-31T18:31:15.453906+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>' 2016-03-31T18:31:15.453912+00:00 app[web.1]: from bin/rails:4:in `require' 2016-03-31T18:31:15.453913+00:00 app[web.1]: from bin/rails:4:in `<main>' 2016-03-31T18:31:15.495891+00:00 app[web.1]: Exiting 2016-03-31T18:31:16.625911+00:00 heroku[web.1]: Process exited with status 1 2016-03-31T18:31:16.659446+00:00 heroku[web.1]: State changed from starting to crashed 2016-03-31T19:21:49.822163+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=libre-teka.herokuapp.com request_id=94c6b60b-5d8f-4159-886f-8c98f9091399 fwd="2.155.140.190" dyno= connect= service= status=503 bytes= 没有问题。

heroku run rails console

我的数据库.yml

Running rails c on libre-teka.... up, run.6894
Loading production environment (Rails 4.2.6)
irb(main):001:0> 

任何sugestions?

pd:抱歉我的英文。

1 个答案:

答案 0 :(得分:1)

char *first[] = { "hello", "my", "friend" }; char *second[] = { "hihi", "haha", "hoho" }; char **table[] = { first, second, NULL }; 的输出看,bundle install gem实际上并不包含在Gemfile中的thin组或Gemfile的顶层。

:production

添加和重新部署可以解决问题。