2013-05-10 2 views
0

마침내 MySQL DB를 Postgres로 변환 할 수 있었고 처음으로이 응용 프로그램을 열 때이 오류가 발생했습니다. 어떤 도움을 주시면 감사하겠습니다. 감사!Heroku- 내 오류 로그를 이해하도록 도와주세요.

나의 이론은 그것이 긁어 모으기, 특히 pg 보석과 관련된 문제라는 것입니다. 그러나 나는 그것을 설치했다, 나는 믿는다.

gem install activerecord-postgresql-adapter 
Password: 
Fetching: activerecord-postgresql-adapter-0.0.1.gem (100%) 
Successfully installed activerecord-postgresql-adapter-0.0.1 
Parsing documentation for activerecord-postgresql-adapter-0.0.1 
Installing ri documentation for activerecord-postgresql-adapter-0.0.1 
1 gem installed 

보석과

source 'https://rubygems.org' 

gem 'rails', '3.2.13' 

# Bundle edge Rails instead: 
# gem 'rails', :git => 'git://github.com/rails/rails.git' 



# Gems used only for assets and not required 
# in production environments by default. 
group :assets do 
    gem 'sass-rails', '~> 3.2.3' 
    gem 'coffee-rails', '~> 3.2.1' 

    # See https://github.com/sstephenson/execjs#readme for more supported runtimes 
    # gem 'therubyracer', :platforms => :ruby 

    gem 'uglifier', '>= 1.0.3' 
end 

gem 'jquery-rails' 


group :test, :development do 
    gem 'turn' 
    gem 'rspec-rails' 
    gem 'capybara' 
    gem 'guard-rspec' 
    gem 'launchy' 
    gem 'mysql2' 
end 

group :production do 
    gem 'pg' 
end 

새로운 오류를 파일 - 업데이트 gemfile-

2013-05-10T17:36:13.640826+00:00 app[web.1]: from /app/config.ru:in `<main>' 
2013-05-10T17:36:13.640826+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval' 
2013-05-10T17:36:13.641078+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file' 
2013-05-10T17:36:13.641078+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap' 
2013-05-10T17:36:13.640340+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!' 
2013-05-10T17:36:18.715882+00:00 heroku[web.1]: State changed from starting to crashed 
2013-05-10T17:36:18.703121+00:00 heroku[web.1]: Process exited with status 1 
2013-05-10T17:36:19.378387+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=powerful-plateau-7517.herokuapp.com fwd="98.210.56.231" dyno= connect= service= status=503 bytes= 
2013-05-10T17:36:19.778557+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=powerful-plateau-7517.herokuapp.com fwd="98.210.56.231" dyno= connect= service= status=503 bytes= 
2013-05-10T17:45:08.279666+00:00 heroku[slugc]: Slug compilation started 
2013-05-10T17:46:03.752569+00:00 heroku[api]: Release v12 created by [email protected] 
2013-05-10T17:46:03.787515+00:00 heroku[api]: Deploy bf11417 by [email protected] 
2013-05-10T17:46:04.205838+00:00 heroku[slugc]: Slug compilation finished 
2013-05-10T17:46:04.230012+00:00 heroku[web.1]: State changed from crashed to starting 
2013-05-10T17:46:05.557323+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 31543` 
2013-05-10T17:46:08.680763+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5) 
2013-05-10T17:46:08.681149+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5) 
2013-05-10T17:46:13.813365+00:00 app[web.1]: => Booting WEBrick 
2013-05-10T17:46:13.813365+00:00 app[web.1]: => Rails 3.2.13 application starting in production on http://0.0.0.0:31543 
2013-05-10T17:46:13.813365+00:00 app[web.1]: => Call with -d to detach 
2013-05-10T17:46:13.813365+00:00 app[web.1]: => Ctrl-C to shutdown server 
2013-05-10T17:46:13.813365+00:00 app[web.1]: Connecting to database specified by DATABASE_URL 
2013-05-10T17:46:15.500836+00:00 app[web.1]: [2013-05-10 17:46:15] INFO WEBrick 1.3.1 
2013-05-10T17:46:15.501191+00:00 app[web.1]: [2013-05-10 17:46:15] INFO ruby 1.9.2 (2011-07-09) [x86_64-linux] 
2013-05-10T17:46:15.507222+00:00 app[web.1]: [2013-05-10 17:46:15] INFO WEBrick::HTTPServer#start: pid=2 port=31543 
2013-05-10T17:46:15.587362+00:00 heroku[web.1]: State changed from starting to up 
2013-05-10T17:46:33.387709+00:00 heroku[api]: Scale to web=0 by [email protected] 
2013-05-10T17:46:36.068010+00:00 heroku[api]: Scale to web=1 by [email protected] 
2013-05-10T17:46:33.914433+00:00 heroku[web.1]: State changed from up to down 
2013-05-10T17:46:38.707975+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 13155` 
2013-05-10T17:46:41.953559+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5) 
2013-05-10T17:46:41.953059+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5) 
2013-05-10T17:46:43.194275+00:00 app[web.1]: Started GET "/" for 98.210.56.231 at 2013-05-10 17:46:43 +0000 
2013-05-10T17:46:43.706970+00:00 app[web.1]: Processing by SammichesController#index as HTML 
2013-05-10T17:46:44.477421+00:00 app[web.1]: => Booting WEBrick 
2013-05-10T17:46:44.477421+00:00 app[web.1]: => Rails 3.2.13 application starting in production on http://0.0.0.0:13155 
2013-05-10T17:46:44.477421+00:00 app[web.1]: => Call with -d to detach 
2013-05-10T17:46:44.477421+00:00 app[web.1]: => Ctrl-C to shutdown server 
2013-05-10T17:46:44.477421+00:00 app[web.1]: Connecting to database specified by DATABASE_URL 
2013-05-10T17:46:44.628189+00:00 app[web.1]: [2013-05-10 17:46:44] INFO WEBrick 1.3.1 
2013-05-10T17:46:44.628189+00:00 app[web.1]: [2013-05-10 17:46:44] INFO ruby 1.9.2 (2011-07-09) [x86_64-linux] 
2013-05-10T17:46:44.628448+00:00 app[web.1]: [2013-05-10 17:46:44] INFO WEBrick::HTTPServer#start: pid=2 port=13155 
2013-05-10T17:46:45.567056+00:00 heroku[router]: at=info method=GET path=/ host=powerful-plateau-7517.herokuapp.com fwd="98.210.56.231" dyno=web.1 connect=1ms service=2395ms 
status=500 bytes=643 
2013-05-10T17:46:45.566136+00:00 app[web.1]: 
2013-05-10T17:46:45.564507+00:00 app[web.1]: Completed 500 Internal Server Error in 1856ms 
2013-05-10T17:46:45.566136+00:00 app[web.1]:          ^
2013-05-10T17:46:45.566136+00:00 app[web.1]: :    SELECT a.attname, format_type(a.atttypid, a.atttypmod), 
2013-05-10T17:46:45.566136+00:00 app[web.1]:      pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod 
2013-05-10T17:46:45.566136+00:00 app[web.1]:    FROM pg_attribute a LEFT JOIN pg_attrdef d 
2013-05-10T17:46:45.566136+00:00 app[web.1]:    WHERE a.attrelid = '"sammiches"'::regclass 
2013-05-10T17:46:45.566136+00:00 app[web.1]:    AND a.attnum > 0 AND NOT a.attisdropped 
2013-05-10T17:46:45.566549+00:00 app[web.1]:    ORDER BY a.attnum 
2013-05-10T17:46:45.566549+00:00 app[web.1]:): 
2013-05-10T17:46:45.566136+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::Error: ERROR: relation "sammiches" does not exist 
2013-05-10T17:46:45.566136+00:00 app[web.1]: LINE 5:    WHERE a.attrelid = '"sammiches"'::regclass 
2013-05-10T17:46:45.566549+00:00 app[web.1]: app/controllers/sammiches_controller.rb:3:in `index' 
2013-05-10T17:46:45.566549+00:00 app[web.1]: 
2013-05-10T17:46:45.566549+00:00 app[web.1]: 
2013-05-10T17:46:45.566136+00:00 app[web.1]:     ON a.attrelid = d.adrelid AND a.attnum = d.adnum 
2013-05-10T17:46:45.929831+00:00 heroku[router]: at=info method=GET path=/favicon.ico host=powerful-plateau-7517.herokuapp.com fwd="98.210.56.231" dyno=web.1 connect=0ms service=10ms status=200 bytes=0 
2013-05-10T17:46:49.553338+00:00 app[web.1]: Started GET "/" for 98.210.56.231 at 2013-05-10 17:46:49 +0000 
2013-05-10T17:46:49.761889+00:00 app[web.1]: Processing by SammichesController#index as HTML 
2013-05-10T17:46:49.884490+00:00 heroku[router]: at=info method=GET path=/ host=powerful-plateau-7517.herokuapp.com fwd="98.210.56.231" dyno=web.1 connect=2ms service=350ms status=500 bytes=643 
2013-05-10T17:46:49.888277+00:00 app[web.1]: LINE 5:    WHERE a.attrelid = '"sammiches"'::regclass 
2013-05-10T17:46:49.886724+00:00 app[web.1]: Completed 500 Internal Server Error in 125ms 
2013-05-10T17:46:49.888277+00:00 app[web.1]:          ^
2013-05-10T17:46:49.888277+00:00 app[web.1]: 
2013-05-10T17:46:49.888277+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::Error: ERROR: relation "sammiches" does not exist 
2013-05-10T17:46:49.888277+00:00 app[web.1]:    WHERE a.attrelid = '"sammiches"'::regclass 
2013-05-10T17:46:49.888277+00:00 app[web.1]:    AND a.attnum > 0 AND NOT a.attisdropped 
2013-05-10T17:46:49.888539+00:00 app[web.1]:    ORDER BY a.attnum 
2013-05-10T17:46:49.888539+00:00 app[web.1]:): 
2013-05-10T17:46:49.888277+00:00 app[web.1]: :    SELECT a.attname, format_type(a.atttypid, a.atttypmod), 
2013-05-10T17:46:49.888277+00:00 app[web.1]:      pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod 
2013-05-10T17:46:49.888539+00:00 app[web.1]: app/controllers/sammiches_controller.rb:3:in `index' 
2013-05-10T17:46:49.888277+00:00 app[web.1]:    FROM pg_attribute a LEFT JOIN pg_attrdef d 
2013-05-10T17:46:49.888539+00:00 app[web.1]: 
2013-05-10T17:46:49.888277+00:00 app[web.1]:     ON a.attrelid = d.adrelid AND a.attnum = d.adnum 
2013-05-10T17:46:49.888539+00:00 app[web.1]: 
2013-05-10T17:46:50.953412+00:00 heroku[router]: at=info method=GET path=/ host=powerful-plateau-7517.herokuapp.com fwd="98.210.56.231" dyno=web.1 connect=1ms service=23ms status=500 bytes=643 
2013-05-10T17:46:50.947731+00:00 app[web.1]: Completed 500 Internal Server Error in 3ms 
2013-05-10T17:46:50.948975+00:00 app[web.1]: 
2013-05-10T17:46:50.948975+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::Error: ERROR: relation "sammiches" does not exist 
2013-05-10T17:46:50.948975+00:00 app[web.1]: LINE 5:    WHERE a.attrelid = '"sammiches"'::regclass 
2013-05-10T17:46:50.948975+00:00 app[web.1]:    WHERE a.attrelid = '"sammiches"'::regclass 
2013-05-10T17:46:50.948975+00:00 app[web.1]:    AND a.attnum > 0 AND NOT a.attisdropped 
2013-05-10T17:46:50.948975+00:00 app[web.1]:          ^
2013-05-10T17:46:50.948975+00:00 app[web.1]: :    SELECT a.attname, format_type(a.atttypid, a.atttypmod), 
2013-05-10T17:46:50.948975+00:00 app[web.1]:      pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod 
2013-05-10T17:46:50.944830+00:00 app[web.1]: Processing by SammichesController#index as HTML 
2013-05-10T17:46:50.941220+00:00 app[web.1]: Started GET "/" for 98.210.56.231 at 2013-05-10 17:46:50 +0000 
2013-05-10T17:46:50.949304+00:00 app[web.1]:    ORDER BY a.attnum 
2013-05-10T17:46:50.949304+00:00 app[web.1]:): 
2013-05-10T17:46:50.949304+00:00 app[web.1]: app/controllers/sammiches_controller.rb:3:in `index' 
2013-05-10T17:46:50.949304+00:00 app[web.1]: 
2013-05-10T17:46:50.948975+00:00 app[web.1]:    FROM pg_attribute a LEFT JOIN pg_attrdef d 
2013-05-10T17:46:50.948975+00:00 app[web.1]:     ON a.attrelid = d.adrelid AND a.attnum = d.adnum 
2013-05-10T17:46:50.949304+00:00 app[web.1]: 
2013-05-10T17:46:56.606488+00:00 heroku[web.1]: Stopping all processes with SIGTERM 
2013-05-10T17:46:57.661330+00:00 app[web.1]: [2013-05-10 17:46:57] ERROR SignalException: SIGTERM 
2013-05-10T17:46:57.661330+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/webrick/server.rb:90:in `select' 
+0

하십시오, 당신은 당신의 Gemfile – Galen

+0

은 또한 당신이 Gemfile에 변경 한 내용이에게 Heroku에 밀어 전에 최선을 다하고 있는지 확인 보여줄 수 있습니다. –

+0

내 gemfile을 추가했습니다. 감사. – DynastySS

답변

1

당신은 모든 환경에서 pg 보석을 당신이 mysql2 보석을 주석 한 사용하려는 경우 . 그렇지 않으면 수행

group :test, :development do 
    gem 'mysql2' 
end 

group :production do 
    gem 'pg', '~> 0.9.0' 
end 
+0

게시 해 주셔서 감사합니다. 내 gemfile을 업데이트하고 heroku로 밀어 넣었으니 이제이 새로운 오류가 발생합니다. 오류 및 업데이트 된 gemfile을 원래 게시물에 추가했습니다. 보고 싶어? 도움에 정말 감사드립니다. – DynastySS

+0

오류는 sammiches 컨트롤러 색인 작업으로 인해 발생합니다. 질문에 해당 코드를 추가 할 수 있습니까? –

관련 문제