繁体   English   中英

Rails 4部署到Heroku“很抱歉,但是出了点问题”

[英]Rails 4 Deploy to Heroku “We're Sorry but something went wrong”

我的应用程序可以在本地计算机上正常运行,并且可以毫无问题地部署到Heroku。 当我使用heroku open打开应用程序时,我看到的只是“对不起,但是出了点问题。” 我已经花了几个小时浏览其他有相同问题但无济于事的人的帖子。

这是我的日志:

    2016-07-12T18:24:09.479273+00:00 heroku[web.1]: State changed from up to starting
2016-07-12T18:24:09.476739+00:00 heroku[web.1]: Restarting
2016-07-12T18:24:12.111071+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2016-07-12T18:24:12.601361+00:00 app[web.1]: [2016-07-12 18:24:12] FATAL SignalException: SIGTERM
2016-07-12T18:24:12.601374+00:00 app[web.1]:    /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/webrick/server.rb:174:in `select'
2016-07-12T18:24:12.601379+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:286:in `start'
2016-07-12T18:24:12.601376+00:00 app[web.1]:    /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/webrick/server.rb:174:in `block in start'
2016-07-12T18:24:12.601379+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/server.rb:80:in `start'
2016-07-12T18:24:12.601377+00:00 app[web.1]:    /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/webrick/server.rb:32:in `start'
2016-07-12T18:24:12.601381+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:80:in `block in server'
2016-07-12T18:24:12.601377+00:00 app[web.1]:    /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/webrick/server.rb:162:in `start'
2016-07-12T18:24:12.601381+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `tap'
2016-07-12T18:24:12.601378+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/handler/webrick.rb:34:in `run'
2016-07-12T18:24:12.601382+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `server'
2016-07-12T18:24:12.601383+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2016-07-12T18:24:12.601383+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>'
2016-07-12T18:24:12.601384+00:00 app[web.1]:    bin/rails:9:in `require'
2016-07-12T18:24:12.601385+00:00 app[web.1]:    bin/rails:9:in `<main>'
2016-07-12T18:24:12.601525+00:00 app[web.1]: [2016-07-12 18:24:12] INFO  going to shutdown ...
2016-07-12T18:24:12.601821+00:00 app[web.1]: [2016-07-12 18:24:12] INFO  WEBrick::HTTPServer#start done.
2016-07-12T18:24:12.657219+00:00 app[web.1]: => Booting WEBrick
2016-07-12T18:24:12.657223+00:00 app[web.1]: => Rails 4.2.6 application starting in production on http://0.0.0.0:34402
2016-07-12T18:24:12.657224+00:00 app[web.1]: => Run `rails server -h` for more startup options
2016-07-12T18:24:12.657225+00:00 app[web.1]: => Ctrl-C to shutdown server
2016-07-12T18:24:12.657225+00:00 app[web.1]: Exiting
2016-07-12T18:24:13.725401+00:00 heroku[web.1]: Process exited with status 143
2016-07-12T18:24:14.166593+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 10514 -e production`
2016-07-12T18:24:19.939675+00:00 app[web.1]: [2016-07-12 18:24:19] INFO  WEBrick 1.3.1
2016-07-12T18:24:19.939733+00:00 app[web.1]: [2016-07-12 18:24:19] INFO  ruby 2.2.4 (2015-12-16) [x86_64-linux]
2016-07-12T18:24:19.940075+00:00 app[web.1]: [2016-07-12 18:24:19] INFO  WEBrick::HTTPServer#start: pid=3 port=10514
2016-07-12T18:24:20.527587+00:00 heroku[web.1]: State changed from starting to up
2016-07-12T18:24:22.365539+00:00 heroku[router]: at=info method=GET path="/" host=guarded-badlands-16200.herokuapp.com request_id=27f63681-fd9d-4100-a044-a618e36ba520 fwd="158.130.211.199" dyno=web.1 connect=0ms service=94ms status=500 bytes=1768
2016-07-12T18:25:34.545884+00:00 heroku[run.9606]: Awaiting client
2016-07-12T18:25:34.617357+00:00 heroku[run.9606]: Starting process with command `bundle exec rake db:migrate`
2016-07-12T18:25:34.619496+00:00 heroku[run.9606]: State changed from starting to up
2016-07-12T18:25:26.927923+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by drewlilley98@gmail.com
2016-07-12T18:25:44.141405+00:00 heroku[run.9606]: Process exited with status 0
2016-07-12T18:25:44.150702+00:00 heroku[run.9606]: State changed from up to complete
2016-07-12T18:25:55.653465+00:00 heroku[router]: at=info method=GET path="/" host=guarded-badlands-16200.herokuapp.com request_id=e357a916-6cb5-4d3e-a061-1de8160cc83f fwd="158.130.211.199" dyno=web.1 connect=1ms service=17ms status=500 bytes=1768
2016-07-12T18:26:10.714090+00:00 heroku[web.1]: Restarting
2016-07-12T18:26:10.714090+00:00 heroku[web.1]: State changed from up to starting
2016-07-12T18:26:14.243471+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 23987 -e production`
2016-07-12T18:26:14.783474+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2016-07-12T18:26:15.718224+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:286:in `start'
2016-07-12T18:26:15.718221+00:00 app[web.1]:    /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/webrick/server.rb:174:in `block in start'
2016-07-12T18:26:15.718198+00:00 app[web.1]: [2016-07-12 18:26:15] FATAL SignalException: SIGTERM
2016-07-12T18:26:15.718222+00:00 app[web.1]:    /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/webrick/server.rb:32:in `start'
2016-07-12T18:26:15.718222+00:00 app[web.1]:    /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/webrick/server.rb:162:in `start'
2016-07-12T18:26:15.718224+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/server.rb:80:in `start'
2016-07-12T18:26:15.718223+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/handler/webrick.rb:34:in `run'
2016-07-12T18:26:15.718225+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:80:in `block in server'
2016-07-12T18:26:15.718211+00:00 app[web.1]:    /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/webrick/server.rb:174:in `select'
2016-07-12T18:26:15.718386+00:00 app[web.1]: [2016-07-12 18:26:15] INFO  going to shutdown ...
2016-07-12T18:26:15.821819+00:00 app[web.1]: Exiting
2016-07-12T18:26:15.718551+00:00 app[web.1]: [2016-07-12 18:26:15] INFO  WEBrick::HTTPServer#start done.
2016-07-12T18:26:15.821805+00:00 app[web.1]: => Booting WEBrick
2016-07-12T18:26:15.821818+00:00 app[web.1]: => Ctrl-C to shutdown server
2016-07-12T18:26:15.821818+00:00 app[web.1]: => Run `rails server -h` for more startup options
2016-07-12T18:26:15.718226+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `tap'
2016-07-12T18:26:15.718226+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `server'
2016-07-12T18:26:15.718227+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2016-07-12T18:26:15.718228+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>'
2016-07-12T18:26:15.718229+00:00 app[web.1]:    bin/rails:9:in `require'
2016-07-12T18:26:15.718229+00:00 app[web.1]:    bin/rails:9:in `<main>'
2016-07-12T18:26:15.821816+00:00 app[web.1]: => Rails 4.2.6 application starting in production on http://0.0.0.0:10514
2016-07-12T18:26:16.921255+00:00 heroku[web.1]: Process exited with status 143
2016-07-12T18:26:17.790319+00:00 app[web.1]: [2016-07-12 18:26:17] INFO  WEBrick 1.3.1
2016-07-12T18:26:17.790345+00:00 app[web.1]: [2016-07-12 18:26:17] INFO  ruby 2.2.4 (2015-12-16) [x86_64-linux]
2016-07-12T18:26:17.790600+00:00 app[web.1]: [2016-07-12 18:26:17] INFO  WEBrick::HTTPServer#start: pid=3 port=23987
2016-07-12T18:26:18.063192+00:00 heroku[web.1]: State changed from starting to up
2016-07-12T18:27:18.860971+00:00 heroku[web.1]: State changed from up to starting
2016-07-12T18:27:18.860309+00:00 heroku[web.1]: Restarting
2016-07-12T18:27:19.992414+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2016-07-12T18:27:20.212647+00:00 app[web.1]: [2016-07-12 18:27:20] FATAL SignalException: SIGTERM
2016-07-12T18:27:20.212660+00:00 app[web.1]:    /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/webrick/server.rb:174:in `block in start'
2016-07-12T18:27:20.212659+00:00 app[web.1]:    /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/webrick/server.rb:174:in `select'
2016-07-12T18:27:20.212667+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2016-07-12T18:27:20.212667+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>'
2016-07-12T18:27:20.212668+00:00 app[web.1]:    bin/rails:9:in `require'
2016-07-12T18:27:20.212668+00:00 app[web.1]:    bin/rails:9:in `<main>'
2016-07-12T18:27:20.212663+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/server.rb:80:in `start'
2016-07-12T18:27:20.212665+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:80:in `block in server'
2016-07-12T18:27:20.212660+00:00 app[web.1]:    /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/webrick/server.rb:32:in `start'
2016-07-12T18:27:20.212661+00:00 app[web.1]:    /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/webrick/server.rb:162:in `start'
2016-07-12T18:27:20.212662+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/handler/webrick.rb:34:in `run'
2016-07-12T18:27:20.212662+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:286:in `start'
2016-07-12T18:27:20.212666+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `tap'
2016-07-12T18:27:20.212666+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `server'
2016-07-12T18:27:20.285467+00:00 app[web.1]: Exiting
2016-07-12T18:27:20.285465+00:00 app[web.1]: => Rails 4.2.6 application starting in production on http://0.0.0.0:23987
2016-07-12T18:27:20.285466+00:00 app[web.1]: => Run `rails server -h` for more startup options
2016-07-12T18:27:20.285466+00:00 app[web.1]: => Ctrl-C to shutdown server
2016-07-12T18:27:20.212788+00:00 app[web.1]: [2016-07-12 18:27:20] INFO  going to shutdown ...
2016-07-12T18:27:20.212827+00:00 app[web.1]: [2016-07-12 18:27:20] INFO  WEBrick::HTTPServer#start done.
2016-07-12T18:27:20.285463+00:00 app[web.1]: => Booting WEBrick
2016-07-12T18:27:20.924866+00:00 heroku[web.1]: Process exited with status 143
2016-07-12T18:27:23.731723+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 59730 -e production`
2016-07-12T18:27:35.015636+00:00 app[web.1]: [2016-07-12 18:27:35] INFO  WEBrick::HTTPServer#start: pid=3 port=59730
2016-07-12T18:27:35.015295+00:00 app[web.1]: [2016-07-12 18:27:35] INFO  ruby 2.2.4 (2015-12-16) [x86_64-linux]
2016-07-12T18:27:35.015258+00:00 app[web.1]: [2016-07-12 18:27:35] INFO  WEBrick 1.3

这是我的gemfile:

    source 'https://rubygems.org'

gem "wysiwyg-rails"
gem 'font-awesome-rails'
gem 'gon'
gem 'faker', '1.4.2'
gem 'ancestry'
gem 'bootstrap-sass'
gem 'autoprefixer-rails'
gem 'simple_form'
gem 'jquery-ui-rails'
gem "awesome_print", require:"ap"
gem "acts_as_follower"
gem 'delayed_job_active_record'
gem 'whenever', :require => false
gem 'arel', '~> 6.0'
gem 'acts_as_votable', '~> 0.10.0'
gem 'jquery-turbolinks'
gem 'carrierwave',             '0.11.2'
gem 'mini_magick',             '4.5.1'
gem 'fog',                     '1.38.0'
group :development do
  gem 'sqlite3'
  gem 'meta_request'
  gem 'better_errors'
  gem 'binding_of_caller'
  gem 'pry-rails'
  gem 'quiet_assets'
  gem 'pry'
  gem 'rails-dev-tweaks', '~> 1.1'
  gem 'rails-dev-boost'
    gem 'rb-fsevent', '>= 0.9.1'
    gem "query_reviewer"
    gem 'unicorn', '~> 5.1'
    gem "rack-handlers"
end

gem 'twitter-bootstrap-rails', :git => 'http://github.com/seyhunak/twitter-bootstrap-rails.git'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.6'


gem 'rack-cors', :require => 'rack/cors'
gem 'devise'
# Use sqlite3 as the database for Active Record

# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# 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', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc


group :production do
  gem 'pg', '0.18.4'
end

# 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'
end

group :development do
  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0'

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

gem "bullet", :group => "development"

我已经尝试过heroku运行rake db:migrate,但没有成功。

弄清楚了。 我必须在我的gemfile中包含ruby版本。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM