Heroku“我们很抱歉,但出了点问题”

时间:2017-01-31 04:42:05

标签: ruby-on-rails postgresql heroku ruby-on-rails-5

新应用,首次部署。静态(无数据库交互)页面正常工作。页面“/посты”(/%D0%BF%D0%BE%D1%81%D1%82%D1%8B)确实与db交互但未加载。告诉我检查日志,但这里是heroku logs,它显示没有错误。该应用程序在本地工作正常

我也heroku run rake db:migrateheroku restart。我的Google-fu失败了,我没有想法。

2017-01-31T04:22:09.123949+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 43847 -e production`
2017-01-31T04:22:14.275034+00:00 heroku[web.1]: State changed from starting to up
2017-01-31T04:22:13.934397+00:00 app[web.1]: [2017-01-31 04:22:13] INFO  WEBrick 1.3.1
2017-01-31T04:22:13.934812+00:00 app[web.1]: [2017-01-31 04:22:13] INFO  WEBrick::HTTPServer#start: pid=4 port=43847
2017-01-31T04:22:13.934443+00:00 app[web.1]: [2017-01-31 04:22:13] INFO  ruby 2.2.6 (2016-11-15) [x86_64-linux]
2017-01-31T04:22:15.403482+00:00 heroku[router]: at=info method=GET path="/%D0%BF%D0%BE%D1%81%D1%82%D1%8B" host=klever27.herokuapp.com request_id=41238742-919d-477e-8905-b8035894b02f fwd="83.219.136.218" dyno=web.1 connect=0ms service=59ms status=500 bytes=1754
2017-01-31T04:22:15.621728+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=klever27.herokuapp.com request_id=bb38bcc6-6a51-489f-88f7-ccf4fc258010 fwd="83.219.136.218" dyno=web.1 connect=0ms service=3ms status=200 bytes=228
2017-01-31T04:25:21.659139+00:00 heroku[router]: at=info method=GET path="/%D0%BF%D0%BE%D1%81%D1%82%D1%8B" host=klever27.herokuapp.com request_id=1ccf1dfc-7a10-4a9b-b75a-8e4acf448ce2 fwd="83.219.136.218" dyno=web.1 connect=0ms service=18ms status=500 bytes=1754
2017-01-31T04:25:21.881420+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=klever27.herokuapp.com request_id=12035d20-802d-45c2-a01c-f773404d45ea fwd="83.219.136.218" dyno=web.1 connect=0ms service=10ms status=200 bytes=228

编辑: 做'heroku ps:scale web = 1','heroku restart'和'heroku logs --tail',这是完整的日志输出

2017-02-01T15:21:00.108739+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 46146 -e production`
2017-02-01T15:21:02.746951+00:00 app[web.1]: [2017-02-01 15:21:02] INFO  WEBrick 1.3.1
2017-02-01T15:21:02.746967+00:00 app[web.1]: [2017-02-01 15:21:02] INFO  ruby 2.2.6 (2016-11-15) [x86_64-linux]
2017-02-01T15:21:02.747258+00:00 app[web.1]: [2017-02-01 15:21:02] INFO  WEBrick::HTTPServer#start: pid=4 port=46146
2017-02-01T15:21:03.257537+00:00 heroku[web.1]: State changed from starting to up
2017-02-01T15:21:04.437762+00:00 heroku[router]: at=info method=GET path="/" host=klever27.herokuapp.com request_id=941d6571-f442-417f-8ef3-7b0e53857bae fwd="95.107.28.104" dyno=web.1 connect=0ms service=32ms status=200 bytes=4051
2017-02-01T15:21:04.608527+00:00 heroku[router]: at=info method=GET path="/..." host=klever27.herokuapp.com request_id=c5271dd1-34d7-47ea-87d8-51ce38fca9b6 fwd="95.107.28.104" dyno=web.1 connect=0ms service=5ms status=404 bytes=1829
2017-02-01T15:21:04.871389+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=klever27.herokuapp.com request_id=5332681d-cca7-4e01-8bdb-88801cdf4e67 fwd="95.107.28.104" dyno=web.1 connect=0ms service=3ms status=200 bytes=228
2017-02-01T15:21:08.013792+00:00 heroku[router]: at=info method=GET path="/%D0%BF%D0%BE%D1%81%D1%82%D1%8B" host=klever27.herokuapp.com request_id=22099bbb-6053-48d0-99d7-f054d6fd833b fwd="95.107.28.104" dyno=web.1 connect=0ms service=36ms status=500 bytes=1754
2017-02-01T15:22:03.966952+00:00 heroku[router]: at=info method=GET path="/" host=klever27.herokuapp.com request_id=9cd2cc76-83fd-4277-b554-163588133844 fwd="95.107.28.104" dyno=web.1 connect=1ms service=7ms status=200 bytes=4051
2017-02-01T15:22:04.133509+00:00 heroku[router]: at=info method=GET path="/..." host=klever27.herokuapp.com request_id=157b13d8-5b41-4ff7-b071-1b67c7a9d404 fwd="95.107.28.104" dyno=web.1 connect=0ms service=3ms status=404 bytes=1829
2017-02-01T15:22:04.404705+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=klever27.herokuapp.com request_id=1c4ed18a-77e6-47a2-84b4-791f70782a26 fwd="95.107.28.104" dyno=web.1 connect=0ms service=2ms status=200 bytes=228
2017-02-01T15:22:09.618532+00:00 heroku[router]: at=info method=GET path="/%D0%BF%D0%BE%D1%81%D1%82%D1%8B" host=klever27.herokuapp.com request_id=152f6950-ae07-4f15-bde0-4bb155257825 fwd="95.107.28.104" dyno=web.1 connect=0ms service=9ms status=500 bytes=1754

EDIT2: 如上所述,发布Gemfile:

source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails'
# Use SCSS for stylesheets
gem 'sass-rails'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', group: :doc
gem 'bootstrap-sass'
gem 'sprockets-rails'
gem 'autoprefixer-rails'

source 'https://rails-assets.org' do
  gem 'rails-assets-tether', '>= 1.3.3'
end

gem 'ckeditor'

gem 'carrierwave'
gem 'mini_magick'

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'
  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console'
  # Use sqlite3 as the database for Active Record
end

group :development do

  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
end

gem 'pg'

group :production do
end

1 个答案:

答案 0 :(得分:0)

此页面的服务器状态代码为500(path =“ /%D0%BF%D0%BE%D1%81%D1%82%D1%8B”),因此尝试运行时没有确切的错误< / p>

rails s -e production了解详情

相关问题