在Heroku上尝试部署RoR App时出现H10错误

时间:2016-02-21 22:03:43

标签: ruby-on-rails ruby heroku

这是Heroku日志 本地一切都很好

2016-02-21T21:48:36.961997+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails.rb:11:in `<top (required)>'
2016-02-21T21:48:36.961999+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/commands/server.rb:4:in `<top (required)>'
2016-02-21T21:48:36.962004+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:74:in `server'
2016-02-21T21:48:36.962000+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:128:in `require'
2016-02-21T21:48:36.962006+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
2016-02-21T21:48:37.595114+00:00 heroku[web.1]: State changed from starting to crashed

Ruby -v 2.1.5 Rails -v 4.1.8

的Gemfile

source 'https://rubygems.org'
ruby '2.1.5'

 # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
 gem 'rails', '4.1.8'
 # Use sqlite3 as the database for Active Record
 group :development, :test do
  gem 'sqlite3'
  gem 'rspec-rails', '~> 3.0'
  gem 'factory_girl_rails', '~> 4.0'
  gem 'guard'
  gem 'guard-rspec', require: false
  gem 'spork-rails'
  gem 'guard-spork'
  gem 'wdm'
 end

 gem 'active_link_to'

 # Use SCSS for stylesheets
 gem 'sass-rails', '~> 4.0.3'
 # Use Uglifier as compressor for JavaScript assets
 gem 'uglifier', '>= 1.3.0'
 # Use CoffeeScript for .js.coffee assets and views
 gem 'coffee-rails', '~> 4.0.0'
 # See https://github.com/sstephenson/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

gem 'will_paginate', '~> 3.0.6'

# 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

# Use debugger
# gem 'debugger', group: [:development, :test]

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin]

group :production do
gem 'rails_12factor'
gem 'pg'
end

gem 'devise'
gem 'cancancan'
gem 'stripe'
gem 'jruby-openssl'
gem 'highline', '~> 1.7', '>= 1.7.8'
gem 'byebug'
gem 'brakeman'

我是Ror的新手,所以任何帮助都会很棒 在Windows上工作 StackOverflow要求我添加更多细节,但我不知道在这里添加什么,所以我只是写这个文本

1 个答案:

答案 0 :(得分:0)

你当然怨恨从sqlite切换到pg。 [heroku doc sayz]网络dyno上崩溃的网络dyno或启动超时将显示此错误。 Sqlite是一个&#34;虚拟&#34; db,它很宽容,因为你可能在这里和那里犯了很小的错误,它是否适用于本地的pg?