2017-12-10 12 views
0

"hello world"페이지와 기본 스켈레톤이있는 레일 앱이 시작되었습니다. 나는 그 일을하기 전에 heroku에 배치하려고합니다. 그러나, 프로덕션 서버와 로컬 서버 모두에서 앱을 시작할 수 없습니다. 나는 그것을 로컬 호스트 3000에서 한 번 시작했지만 지금은 무언가를 바 꾸었습니다. 작동하지 않습니다. 내가 변경 한 유일한 것들은 sqlite와 함께 herku doesnt 작업을하기 때문에 생산에 devlopment와 pg gem에 sqlite gem을 넣는 것이었다. 로컬 서버를 시작하려고 할 때왜 내 레일 앱이 배포되지 않고 (H10 코드 오류) 레일 서버가 시작되지 않습니까?

: 다음과 같은 오류를 참조하십시오

C:\Sites\nutri>rails s 
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.5-x86-mingw32/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError) 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.5-x86-mingw32/lib/sqlite3.rb:6:in `rescue in <top (required)>' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.5-x86-mingw32/lib/sqlite3.rb:2:in `<top (required)>' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.14.5/lib/bundler/runtime.rb:91:in `require' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.14.5/lib/bundler/runtime.rb:91:in `block (2 levels) in require' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.14.5/lib/bundler/runtime.rb:86:in `each' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.14.5/lib/bundler/runtime.rb:86:in `block in require' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.14.5/lib/bundler/runtime.rb:75:in `each' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.14.5/lib/bundler/runtime.rb:75:in `require' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.14.5/lib/bundler.rb:107:in `require' 
     from C:/Sites/nutri/config/application.rb:7:in `<top (required)>' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:88:in `require' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:88:in `block in server' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:85:in `tap' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:85:in `server' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:49:in `run_command!' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.6/lib/rails/commands.rb:18:in `<top (required)>' 
     from bin/rails:4:in `require' 
     from bin/rails:4:in `<main>' 

생산 eapp 일 개방 내가 H10 오류가 발생하는 경우, 불행하게도 herko의 지원 절은 tpage 나던이 문제를 해결하는 방법에 대한 세부 사항으로 이동 오류 및 단지 내가 이해하지 못하는 코드의 의미를 설명합니다.

Heroku가 로그 :

C:\Sites\nutri>heroku logs 
This is the legacy Heroku CLI. Please install the new CLI from https://cli.heroku.com 
2017-12-10T05:44:26.046591+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/server.rb:319:in `build_app_and_options_from_config' 
2017-12-10T05:44:26.046604+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/server.rb:219:in `app' 
2017-12-10T05:44:26.046616+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/commands/server.rb:84:in `app' 
2017-12-10T05:44:26.046628+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/server.rb:354:in `wrapped_app' 
2017-12-10T05:44:26.046639+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/server.rb:283:in `start' 
2017-12-10T05:44:26.046649+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/commands/server.rb:104:in `start' 
2017-12-10T05:44:26.046660+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:90:in `block in server' 
2017-12-10T05:44:26.046670+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:85:in `tap' 
2017-12-10T05:44:26.046680+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:85:in `server' 
2017-12-10T05:44:26.046690+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:49:in `run_command!' 
2017-12-10T05:44:26.046701+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/commands.rb:18:in `<top (required)>' 
2017-12-10T05:44:26.046712+00:00 app[web.1]: from bin/rails:4:in `require' 
2017-12-10T05:44:26.046723+00:00 app[web.1]: from bin/rails:4:in `<main>' 
2017-12-10T05:44:26.239147+00:00 heroku[web.1]: State changed from starting to crashed 
2017-12-10T05:44:32.729566+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=murmuring-woodland-44138.herokuapp.com request_id=49085526-9dfc-4fe7-abba-b11be446f965 fwd="82.102.17.248" dyno= connect= service= status=503 bytes= protocol=https 
2017-12-10T05:45:15.010455+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=murmuring-woodland-44138.herokuapp.com request_id=e090f107-9036-4e55-9d70-8f450c4aa7a2 fwd="82.102.17.248" dyno= connect= service= status=503 bytes= protocol=https 
2017-12-10T06:09:54.415945+00:00 heroku[web.1]: State changed from crashed to starting 
2017-12-10T06:09:56.992085+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 59932 -e production` 
2017-12-10T06:10:00.485332+00:00 heroku[web.1]: State changed from starting to crashed 
2017-12-10T06:10:00.375617+00:00 app[web.1]: => Booting Puma 
2017-12-10T06:10:00.375631+00:00 app[web.1]: => Rails 5.0.6 application starting in production on http://0.0.0.0:59932 
2017-12-10T06:10:00.375632+00:00 app[web.1]: => Run `rails server -h` for more startup options 
2017-12-10T06:10:00.375633+00:00 app[web.1]: Exiting 
2017-12-10T06:10:00.375723+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/connection_specification.rb:176:in `rescue in spec': Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). (Gem::LoadError) 
2017-12-10T06:10:00.375747+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/connection_specification.rb:173:in `spec' 
2017-12-10T06:10:00.375748+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.6/lib/active_record/connection_handling.rb:53:in `establish_connection' 
2017-12-10T06:10:00.375751+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.6/lib/active_record/railtie.rb:125:in `block (2 levels) in <class:Railtie>' 
2017-12-10T06:10:00.375752+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/lazy_load_hooks.rb:69:in `instance_eval' 
2017-12-10T06:10:00.375754+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/lazy_load_hooks.rb:69:in `block in execute_hook' 
2017-12-10T06:10:00.375775+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/lazy_load_hooks.rb:60:in `with_execution_control' 
2017-12-10T06:10:00.375776+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/lazy_load_hooks.rb:65:in `execute_hook' 
2017-12-10T06:10:00.375779+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/lazy_load_hooks.rb:50:in `block in run_load_hooks' 
2017-12-10T06:10:00.469714+00:00 heroku[web.1]: Process exited with status 1 
2017-12-10T06:10:00.375780+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/lazy_load_hooks.rb:49:in `each' 
2017-12-10T06:10:00.375782+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/lazy_load_hooks.rb:49:in `run_load_hooks' 
2017-12-10T06:10:00.375783+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.6/lib/active_record/base.rb:324:in `<module:ActiveRecord>' 
2017-12-10T06:10:00.375826+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.6/lib/active_record/base.rb:24:in `<top (required)>' 
2017-12-10T06:10:00.375827+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:293:in `require' 
2017-12-10T06:10:00.375828+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:293:in `block in require' 
2017-12-10T06:10:00.375829+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:259:in `load_dependency' 
2017-12-10T06:10:00.375830+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:293:in `require' 
2017-12-10T06:10:00.375831+00:00 app[web.1]: from /app/app/models/application_record.rb:1:in `<top (required)>' 
2017-12-10T06:10:00.375832+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:293:in `require' 
2017-12-10T06:10:00.375832+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:293:in `block in require' 
2017-12-10T06:10:00.375833+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:259:in `load_dependency' 
2017-12-10T06:10:00.375835+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:293:in `require' 
2017-12-10T06:10:00.375836+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:380:in `block in require_or_load' 
2017-12-10T06:10:00.375837+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:37:in `block in load_interlock' 
2017-12-10T06:10:00.375838+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/dependencies/interlock.rb:12:in `block in loading' 
2017-12-10T06:10:00.375839+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/concurrency/share_lock.rb:150:in `exclusive' 
2017-12-10T06:10:00.375840+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/dependencies/interlock.rb:11:in `loading' 
2017-12-10T06:10:00.375842+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:37:in `load_interlock' 
2017-12-10T06:10:00.375865+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:358:in `require_or_load' 
2017-12-10T06:10:00.375866+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:336:in `depend_on' 
2017-12-10T06:10:00.375868+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:252:in `require_dependency' 
2017-12-10T06:10:00.375869+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/engine.rb:476:in `block (2 levels) in eager_load!' 
2017-12-10T06:10:00.375871+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/engine.rb:475:in `each' 
2017-12-10T06:10:00.375873+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/engine.rb:475:in `block in eager_load!' 
2017-12-10T06:10:00.375891+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/engine.rb:473:in `each' 
2017-12-10T06:10:00.375892+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/engine.rb:473:in `eager_load!' 
2017-12-10T06:10:00.375893+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/engine.rb:354:in `eager_load!' 
2017-12-10T06:10:00.375897+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/application/finisher.rb:59:in `block in <module:Finisher>' 
2017-12-10T06:10:00.375896+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/application/finisher.rb:59:in `each' 
2017-12-10T06:10:00.375901+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/initializable.rb:30:in `run' 
2017-12-10T06:10:00.375899+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/initializable.rb:30:in `instance_exec' 
2017-12-10T06:10:00.375920+00:00 app[web.1]: from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component' 
2017-12-10T06:10:00.375920+00:00 app[web.1]: from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each' 
2017-12-10T06:10:00.375919+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/initializable.rb:55:in `block in run_initializers' 
2017-12-10T06:10:00.375922+00:00 app[web.1]: from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from' 
2017-12-10T06:10:00.375923+00:00 app[web.1]: from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component' 
2017-12-10T06:10:00.375925+00:00 app[web.1]: from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:347:in `each' 
2017-12-10T06:10:00.375943+00:00 app[web.1]: from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:347:in `call' 
2017-12-10T06:10:00.375944+00:00 app[web.1]: from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component' 
2017-12-10T06:10:00.375945+00:00 app[web.1]: from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each' 
2017-12-10T06:10:00.375947+00:00 app[web.1]: from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each' 
2017-12-10T06:10:00.375948+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/initializable.rb:54:in `run_initializers' 
2017-12-10T06:10:00.375965+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/application.rb:352:in `initialize!' 
2017-12-10T06:10:00.375966+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>' 
2017-12-10T06:10:00.375968+00:00 app[web.1]: from /app/config.ru:3:in `require_relative' 
2017-12-10T06:10:00.375980+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>' 
2017-12-10T06:10:00.375982+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/builder.rb:55:in `instance_eval' 
2017-12-10T06:10:00.375983+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/builder.rb:55:in `initialize' 
2017-12-10T06:10:00.375990+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/server.rb:319:in `build_app_and_options_from_config' 
2017-12-10T06:10:00.375984+00:00 app[web.1]: from /app/config.ru:in `new' 
2017-12-10T06:10:00.375988+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/builder.rb:40:in `parse_file' 
2017-12-10T06:10:00.375985+00:00 app[web.1]: from /app/config.ru:in `<main>' 
2017-12-10T06:10:00.375987+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/builder.rb:49:in `new_from_string' 
2017-12-10T06:10:00.375985+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/builder.rb:49:in `eval' 
2017-12-10T06:10:00.375992+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/server.rb:219:in `app' 
2017-12-10T06:10:00.376005+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/server.rb:354:in `wrapped_app' 
2017-12-10T06:10:00.376005+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/commands/server.rb:84:in `app' 
2017-12-10T06:10:00.376008+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/commands/server.rb:104:in `start' 
2017-12-10T06:10:00.376010+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:90:in `block in server' 
2017-12-10T06:10:00.376006+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/server.rb:283:in `start' 
2017-12-10T06:10:00.376019+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:85:in `server' 
2017-12-10T06:10:00.376012+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:85:in `tap' 
2017-12-10T06:10:00.376021+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:49:in `run_command!' 
2017-12-10T06:10:00.376027+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/commands.rb:18:in `<top (required)>' 
2017-12-10T06:10:00.376048+00:00 app[web.1]: from bin/rails:4:in `<main>' 
2017-12-10T06:10:00.376047+00:00 app[web.1]: from bin/rails:4:in `require' 
2017-12-10T06:27:43.466729+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=murmuring-woodland-44138.herokuapp.com request_id=b7646d82-6d59-45b2-8040-e16cf89d513a fwd="82.102.17.248" dyno= connect= service= status=503 bytes= protocol=https 

C:\Sites\nutri> 

통지 특히 마지막 줄 : 여기에

2017-12-10T06:27:43.466729+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=murmuring-woodland-44138.herokuapp.com request_id=b7646d82-6d59-45b2-8040-e16cf89d513a fwd="82.102.17.248" dyno= connect= service= status=503 bytes= protocol=https 

내가 검색하고 읽고 많은 유사한 질문,하지만 아무도 내 특정 사건에 대한 답을 갖고있는 것 같다 . 어떤 도움을 많이 주셨습니다.

편집 : 추가 보석 파일 :

source 'https://rubygems.org' 

git_source(:github) do |repo_name| 
    repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") 
    "https://github.com/#{repo_name}.git" 
end 


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 
gem 'rails', '~> 5.0.6' 
# Use sqlite3 as the database for Active Record 
#gem 'sqlite3' #commented out see below 
# Use Puma as the app server 
gem 'puma', '~> 3.0' 
# 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.2' 
# 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 navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks 
gem 'turbolinks', '~> 5' 
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 
gem 'jbuilder', '~> 2.5' 
# Use Redis adapter to run Action Cable in production 
# gem 'redis', '~> 3.0' 
# Use ActiveModel has_secure_password 
# gem 'bcrypt', '~> 3.1.7' 

# 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 'sqlite3' #, '1.3.5'#added here because didnt deploy to heroku, as advised on https://gist.github.com/JennDudley/2493288 
    gem 'byebug', platform: :mri 
end 

group :development do 
    # Access an IRB console on exception pages or by using <%= console %> anywhere in the code. 
    gem 'web-console', '>= 3.3.0' 

end 

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

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

편집 2, database.yml을 :

# SQLite version 3.x 
# gem install sqlite3 
# 
# Ensure the SQLite 3 gem is defined in your Gemfile 
# gem 'sqlite3' 
# 
default: &default 
    adapter: sqlite3 
    pool: 5 
    timeout: 5000 

development: 
    <<: *default 
    database: db/development.sqlite3 

# Warning: The database defined as "test" will be erased and 
# re-generated from your development database when you run "rake". 
# Do not set this db to the same as development or production. 
test: 
    <<: *default 
    database: db/test.sqlite3 

production: 
    <<: *default 
    database: db/production.sqlite3 

편집 3 : 새 설정/datbase.yml 파일 EDIT 4 : 새로운 설정/DATBASE. yml 파일 (실수로 다른 데이터베이스에서 잘못된 데이터베이스 yml 파일을 추가했습니다. 내 데이터베이스 yml 파일입니다.)

# SQLite version 3.x 
# gem install sqlite3 
# 
# Ensure the SQLite 3 gem is defined in your Gemfile 
# gem 'sqlite3' 
# 
default: &default 
    adapter: postgresql #sqlite3 
    pool: 5 
    timeout: 5000 

# development: 
# <<: *default 
# database: db/development.sqlite3 
development: 
    <<: *default 
    database: nutri_development 

# Warning: The database defined as "test" will be erased and 
# re-generated from your development database when you run "rake". 
# Do not set this db to the same as development or production. 
# test: 
# <<: *default 
# database: db/test.postgresql #sqlite3 

test: 
    <<: *default 
    database: nutri_test 

# production: 
# <<: *default 
# database: db/production.postgresql #sqlite3 
production: 
    <<: *default 
    database: nutri_production 
    prepared_statements: false 
    encoding: unicode 

# SQLite version 3.x 
# gem install sqlite3 
# 
# Ensure the SQLite 3 gem is defined in your Gemfile 
# gem 'sqlite3' 
# 
# default: &default 
# adapter: sqlite3 
# pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> 
# timeout: 5000 
# default: &default 
# adapter: postgresql 
# pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> 
# timeout: 5000 


# development: 
# <<: *default 
# database: db/development.sqlite3 
# development: 
# <<: *default 
# database: rails-tutorial_development #http://guides.rubyonrails.org/configuring.html#configuring-a-database 

# Warning: The database defined as "test" will be erased and 
# re-generated from your development database when you run "rake". 
# Do not set this db to the same as development or production. 

# test: 
# <<: *default 
# database: db/test.sqlite3 
# test: 
# <<: *default 
# database: rails-tutorial_development 

# production: 
# <<: *default 
# database: db/production.sqlite3 

# production: 
# <<: *default 
# adapter: postgresql 
# prepared_statements: false 
# encoding: unicode 
# database: rails-tutorial_development 

이 postgresql을 사용하기에 올바른 구성입니까?

+0

'Gemfile'을 변경 한 후에'bundle install'을 실행 했습니까? 업데이트 된'Gemfile.lock'도 푸시 했나요? – spickermann

+0

dev와 prod 모두에서 정말 postgresql을 사용해야합니다. sqlite와 postgresql 사이에는 구문상의 차이점이 있으며 이러한 차이점에서 발생할 수있는 버그를 추적하는 것은 가치가 없습니다. 오류 (Heroku에서)의 관점에서 보면 'config/database.yml'을 수정하지 않은 것 같습니다. (오류 스택의 '데이터베이스 어댑터에 대해'지정된 'sqlite3'부분을 참조하십시오.) 질문에'database.yml'을 추가 할 수 있습니다. – jvillian

+0

@spickermann 나는 번들을 설치했다. 내가 gemfile 잠금을 업데이트했는지 확실하지 않습니다. 어떻게해야합니까? – Owen

답변

0

기본적으로 sqlite3을 어댑터로 지정 하시겠습니까?

default: &default 
    adapter: sqlite3 
    pool: 5 
    timeout: 5000 

그런 다음, 당신의 생산에, 당신은 기본값을 사용 플러스 sqlite3 데이터베이스를 지정합니다.

production: 
    <<: *default 
    database: db/production.sqlite3 

대신 같은 것을 보일 것입니다 : 다시

production: 
    <<: *default 
    adapter: postgresql 
    encoding: unicode 

을, 당신은 정말 sqlite3를과 PostgreSQL 사이의 구문 차이를 방지하기 위해 개발 시스템에서의 PostgreSQL를 설정해야합니다.

데이터베이스를 프로비저닝하려면 Heroku의 응용 프로그램 리소스 탭으로 이동하십시오. '부가 기능'에서 'Postgres'를 검색하십시오. Heroku가 거기에서 당신을 걸어 갈 것입니다.오히려 모든 마이그레이션의 기본적 결과이다 (스키마에서로드하려는 경우,

> heroku run rake db:migrate --app your_app_name 

을 또는 :

당신이 설정을 완료하면, 터미널에서 당신은 실행해야합니다

> heroku run rake db:schema:load 

REPLY

여기 내 database.yml가 어떻게 표시되는지를 보여줍니다 :) 하나 개의 파일에 으깬, 당신은 뭔가를 할 (당연히, 내 실제 응용 프로그램 이름에 'APP_NAME'대체 한) 내 애플 리케이션 중 하나 : 당신이 볼 수 있듯이

default: &default 
    adapter: postgresql 
    encoding: unicode 
    # For details on connection pooling, see rails configuration guide 
    # http://guides.rubyonrails.org/configuring.html#database-pooling 
    pool: 5 

... 

production: 
    <<: *default 
    database: app_name_production 
    username: app_name_admin 
    password: <%= ENV['APP_NAME_DATABASE_PASSWORD'] %> 

, 나는 사실 내 생산 섹션에 database:username: 있습니다. username:이 필요하지 않을 수도 있습니다. 확실하지 않습니다. SQLite on Heroku에 따르면 database: ...을 포함해야합니다.

database: db/production.sqlite3 

encodingpool 비트 섹션 3.15.3 Configuring a Database에 레일 가이드 (A PostreSQL 데이터베이스 구성)에서 오는 : 그러나, 가이드에 명시된 바와 같이, 그것은 사용자 정의 이름이 아닌이어야한다. Heroku 가이드는 encoding을 지정하지 않지만 Rails 가이드는 지정하지 않습니다. 나는 Heroku 가이드를 통해 레일스 가이드의 우선 순위를 정하고 모든 database.yml 파일에이를 포함시킵니다.

이미 pooltimeoutdefault에 포함 했으므로 production에 다시 설정하지 않아도됩니다.

"개발 컴퓨터에서 postgreSQL 설정"이란 로컬 컴퓨터에 postgreSQL 서버를 설치하는 것을 의미합니다. pg 보석을 포함하기 만하면 서버가 설치되지 않습니다. 전용은 개발시 postgreSQL을 사용하기로 결정한 경우 (sqlite 대신)이 작업을 수행해야합니다. 이 부분은 이 아니며 Heroku에 배포하는 것과 관련하여이 아닙니다.

컴퓨터에 postgresql을 설치하는 방법에 대한 자세한 내용은 Heroku Postgres 안내서의 Local setup 섹션을 참조하십시오.

Twelve-Factor AppDev/prod parity 섹션을 읽을 수도 있습니다.

sqlite로 계속 개발하고 postgresql로 배포하기로 결정했다면 개발 컴퓨터에서 postgresql을 설정하는 것에 대한 저의 의견을 완전히 무시할 수 있습니다. 그러나 이전에 말했듯이, sqlite와 postgres는 약간의 sytactic 차이점을 가지고 있습니다. (필자가 생각한 것 중 하나는 각각의 데이터베이스가 LIKE 기능을 어떻게 구현하는지입니다.) 이것이 의미하는 바는 sqlite에서 완벽하게 작동하지만 포스트그레스에서 제작을 중단하는 코드를 가질 수 있다는 것입니다. 이러한 상황이 발생하면 구문 차이로 인해 오류가 발생한 위치를 추적 한 다음 구문을 수정해야합니다. 그건 재미 없어.

+0

시도하기 전에 좀 더 설명해 주실 수 있습니까? 왜 지금 "데이터베이스 :"부분이 필요없고 어댑터 :, 인코딩 : 및 풀 : 변수 추가의 중요성은 무엇입니까? 나는 여전히 레일 주변에있는 길을 찾고자 노력하고 있으며 앞으로도이 오류가 있다는 것을 알고 있기 때문에이 오류를 정말로 이해하고 싶습니다. 많은 도움을 주신 – Owen

+0

또한 "내 개발 컴퓨터에서 postgresql을 설정 하시겠습니까?" 내 컴퓨터에 실제로 변경되지 않는 보석 파일에 포함시키는 것이 문제라고 생각했습니다. 나는 heroku에게 depelling하는 것은 매우 복잡 할 것이다라는 것을 모르고 있었다. – Owen

+0

답글에 REPLY가 추가되었습니다. – jvillian

0

지역 서버 오류가

from C:/Sites/nutri/config/application.rb:7:in '<top (required)>' 

오류를 제출할 예정이다 파일 sqlite3/sqlite3_native이있는 경우

C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.5-x86- 
mingw32/lib/sqlite3.rb:6:in 'require': cannot load such file -- 
sqlite3/sqlite3_native (LoadError) 

검사입니다.

먼저 로컬로 배포하고 Heroku에 대해 생각해보십시오.

2017-12-10T06:10:00.375723+00:00 app[web.1]: 
/app/vendor/bundle/ruby/2.3.0/gems/activerecord- 
5.0.6/lib/active_record/connection_adapters/ 
connection_specification.rb:176:in `rescue in spec': Specified 
'sqlite3' for database adapter, but the gem is not loaded. Add `gem 
'sqlite3'` to your Gemfile (and ensure its version is at the minimum 
required by ActiveRecord). (Gem::LoadError) 

Heroku가 서버 문제는 rails (액티브)와 sqlite3 사이의 보석 호환성 문제를 말한다. sqlite3의 버전을 언급 한 이유가 무엇인가요? 이

gem 'sqlite3', '1.3.5' 

sqlite3 버전

또한

rails 작품의 특정 버전 pg 보석

gem 'pg', '0.18.4' 

이 모든 시도 아래 같은 버전을 가질 수 주석을 시도, 당신의 Gemfile.lock 파일을 이동

mv Gemfile.lock Gemfile.lock_ 

지금 보석 설치

bundle install 
+0

sqlite3의 버전이 최신 버전을 사용하는지 여부를 확인하기 위해 주석 처리했습니다. 어쩌면 시대에 뒤떨어 진 것 같아요. 정말 어둠 속에서 찔러 버리고. gemfile 잠금을 이동하면 무엇이 달성됩니까? 그리고 어디서부터 이사가 어디로 가고 왜? – Owen

+0

Heroku는 sqlite에서 작동하지 않습니다. – jvillian