2014-09-13 4 views
3

나는 Heroku에서 고안 작업을하려고합니다. 내 컴퓨터에서 제대로 작동하지만 Heroku에서 코드를 푸는 경우 사용자 생성을 시도 할 때마다이 오류가 발생합니다. '죄송합니다.하지만 문제가 발생했습니다.Devise & Heroku 오류

응용 프로그램 소유자는 로그에서 자세한 정보를 확인하십시오 .` 로그와 오류가 없는지 확인했습니다. 여기에 그들이있다 :

2014-09-13T06:28:11.400635+00:00 heroku[router]: at=info method=GET path="https://stackoverflow.com/users/" host=birdl-dev.herokuapp.com request_id=0216598c-e1f8-465f-a68b-b7e648df5309 fwd="24.50.121.235" dyno=web.1 connect=1ms service=219ms status=200 bytes=945 
2014-09-13T06:28:15.654213+00:00 heroku[router]: at=info method=GET path="/" host=birdl-dev.herokuapp.com request_id=f1e788f3-ae69-4eb4-a64f-f81a3b8c528e fwd="24.50.121.235" dyno=web.1 connect=1ms service=9ms status=304 bytes=964 
2014-09-13T06:28:15.770802+00:00 heroku[router]: at=info method=GET path="/assets/application-cb25950d0e442f07f1fa7be553c321c3.css" host=birdl-dev.herokuapp.com request_id=0f40d69d-bfe7-4de1-aa1c-8ec251710b1e fwd="24.50.121.235" dyno=web.1 connect=0ms service=7ms status=404 bytes=954 
2014-09-13T06:28:15.776790+00:00 heroku[router]: at=info method=GET path="/assets/application-433aac58cfba85b04e81533418015cc6.js" host=birdl-dev.herokuapp.com request_id=6d5e0aca-1692-4029-9c46-76e3c1298fae fwd="24.50.121.235" dyno=web.1 connect=1ms service=8ms status=404 bytes=938 
2014-09-13T06:28:20.043253+00:00 heroku[router]: at=info method=GET path="https://stackoverflow.com/users/sign_in" host=birdl-dev.herokuapp.com request_id=93b3a4fb-0526-4497-a05c-6921d5c3dd14 fwd="24.50.121.235" dyno=web.1 connect=4ms service=68ms status=304 bytes=977 
2014-09-13T06:28:20.164359+00:00 heroku[router]: at=info method=GET path="/assets/application-cb25950d0e442f07f1fa7be553c321c3.css" host=birdl-dev.herokuapp.com request_id=2885dbd7-2122-4fd7-993b-476d1b8cac8c fwd="24.50.121.235" dyno=web.1 connect=1ms service=8ms status=404 bytes=967 
2014-09-13T06:28:20.162472+00:00 heroku[router]: at=info method=GET path="/assets/application-433aac58cfba85b04e81533418015cc6.js" host=birdl-dev.herokuapp.com request_id=d56a36a7-ae71-4d43-ae85-be6849818767 fwd="24.50.121.235" dyno=web.1 connect=0ms service=9ms status=404 bytes=951 
2014-09-13T06:28:24.725755+00:00 heroku[router]: at=info method=GET path="/assets/application-433aac58cfba85b04e81533418015cc6.js" host=birdl-dev.herokuapp.com request_id=f4798f12-b3e4-4be4-8ea7-b461fafe6eb8 fwd="24.50.121.235" dyno=web.1 connect=2ms service=13ms status=404 bytes=951 
2014-09-13T06:28:24.589217+00:00 heroku[router]: at=info method=GET path="https://stackoverflow.com/users/sign_up" host=birdl-dev.herokuapp.com request_id=cb92257d-c1c3-4cc5-a111-b5b1eb90e0e3 fwd="24.50.121.235" dyno=web.1 connect=0ms service=18ms status=304 bytes=1032 
2014-09-13T06:28:24.713540+00:00 heroku[router]: at=info method=GET path="/assets/application-cb25950d0e442f07f1fa7be553c321c3.css" host=birdl-dev.herokuapp.com request_id=7768d23a-c34e-4dff-a8ea-c4a2cd3caf29 fwd="24.50.121.235" dyno=web.1 connect=0ms service=9ms status=404 bytes=967 
2014-09-13T06:28:34.201030+00:00 heroku[router]: at=info method=POST path="/users" host=birdl-dev.herokuapp.com request_id=c1e7ab4c-68dd-433e-8f26-870c2392ab3e fwd="24.50.121.235" dyno=web.1 connect=1ms service=772ms status=500 bytes=1335 
2014-09-13T06:28:39.163670+00:00 heroku[router]: at=info method=GET path="/users" host=birdl-dev.herokuapp.com request_id=64aa0964-4b0a-476a-9a12-eb6fcd5b5fa3 fwd="24.50.121.235" dyno=web.1 connect=0ms service=15ms status=200 bytes=944 
2014-09-13T06:28:39.303286+00:00 heroku[router]: at=info method=GET path="/assets/application-cb25950d0e442f07f1fa7be553c321c3.css" host=birdl-dev.herokuapp.com request_id=6704909e-f077-4a92-af68-5fa63939023e fwd="24.50.121.235" dyno=web.1 connect=1ms service=11ms status=404 bytes=985 
2014-09-13T06:28:39.315308+00:00 heroku[router]: at=info method=GET path="/assets/application-433aac58cfba85b04e81533418015cc6.js" host=birdl-dev.herokuapp.com request_id=98a0ab32-b80e-4cda-8fc6-1e3877f25a75 fwd="24.50.121.235" dyno=web.1 connect=1ms service=23ms status=404 bytes=969 
2014-09-13T06:29:05.437893+00:00 heroku[router]: at=info method=GET path="/" host=birdl-dev.herokuapp.com request_id=93d4b29e-73c0-43ff-97a8-64c864926af5 fwd="54.89.230.255" dyno=web.1 connect=1ms service=13ms status=200 bytes=396 

development.rb

Rails.application.configure do 
    # Settings specified here will take precedence over those in config/application.rb.                                

    # In the development environment your application's code is reloaded on                                   
    # every request. This slows down response time but is perfect for development                                  
    # since you don't have to restart the web server when you make code changes.                                  
    config.cache_classes = false 

    # Do not eager load code on boot.                                             
    config.eager_load = false 

    # Show full error reports and disable caching.                                         
    config.consider_all_requests_local  = true 
    config.action_controller.perform_caching = false 

    config.action_mailer.delivery_method = :sendmail 
    config.action_mailer.perform_deliveries = true 
    config.action_mailer.default_url_options = { host: 'localhost', port: 3000 } 
    # Don't care if the mailer can't send.                                           
    config.action_mailer.raise_delivery_errors = false 

    # Print deprecation notices to the Rails logger.                                         
    config.active_support.deprecation = :log 

    # Raise an error on page load if there are pending migrations.                                     
    config.active_record.migration_error = :page_load 

    # Debug mode disables concatenation and preprocessing of assets.                                     
    # This option may cause significant delays in view rendering with a large                                   
    # number of complex assets.                                              
    config.assets.debug = true 

    # Adds additional error checking when serving assets at runtime.                                     
    # Checks for improperly declared sprockets dependencies.                                       
    # Raises helpful error messages.                                             
    config.assets.raise_runtime_errors = true 

    # Raises error for missing translations                                           
    # config.action_view.raise_on_missing_translations = true                                       
end 

production.rb

Rails.application.configure do 
    # Settings specified here will take precedence over those in config/application.rb.                                

    # Code is not reloaded between requests.                                           
    config.cache_classes = true 

    # Eager load code on boot. This eager loads most of Rails and                                      
    # your application in memory, allowing both threaded web servers                                     
    # and those relying on copy on write to perform better.                                       
    # Rake tasks automatically ignore this option for performance.                                     
    config.eager_load = true 

    # Full error reports are disabled and caching is turned on.                                      
    config.consider_all_requests_local  = false 
    config.action_controller.perform_caching = true 

    # Enable Rack::Cache to put a simple HTTP cache in front of your application                                  
    # Add `rack-cache` to your Gemfile before enabling this.                                       
    # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.                           
    # config.action_dispatch.rack_cache = true                                          

    # Disable Rails's static asset server (Apache or nginx will already do this).                                  
    config.serve_static_assets = false 

    # Compress JavaScripts and CSS.                                             
    config.assets.js_compressor = :uglifier 
    # config.assets.css_compressor = :sass                                           

    # Do not fallback to assets pipeline if a precompiled asset is missed.                                   
    config.assets.compile = false 

    # Generate digests for assets URLs.                                            
    config.assets.digest = true 

    # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb                            

    # Specifies the header that your server uses for sending files.                                     
    # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache                                   
    # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx                                  

    # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.                             
    # config.force_ssl = true                                               

    # Set to :debug to see everything in the log.                                          
    config.log_level = :info 

    # Prepend all log lines with the following tags.                                         
    # config.log_tags = [ :subdomain, :uuid ]                                           

    # Use a different logger for distributed setups.                                         
    # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)                                    

    # Use a different cache store in production. 
    # config.cache_store = :mem_cache_store                                           

    # Enable serving of images, stylesheets, and JavaScripts from an asset server.                                 
    # config.action_controller.asset_host = "http://assets.example.com"                                    

    # Ignore bad email addresses and do not raise email delivery errors.                                    
    # Set this to true and configure the email server for immediate delivery to raise delivery errors.                            
    # config.action_mailer.raise_delivery_errors = false                                        

    # Enable locale fallbacks for I18n (makes lookups for any locale fall back to                                  
    # the I18n.default_locale when a translation cannot be found).                                     
    config.i18n.fallbacks = true 

    # Send deprecation notices to registered listeners.                                        
    config.active_support.deprecation = :notify 

    # Disable automatic flushing of the log to improve performance.                                     
    # config.autoflush_log = false                                             

    # Use default logging formatter so that PID and timestamp are not suppressed.                                  
    config.log_formatter = ::Logger::Formatter.new 

    # Do not dump schema after migrations.                                           
    config.active_record.dump_schema_after_migration = false 
end 

어떤 생각? 당신은 사용자를 만들 때

답변

4

나는 오류가 당신에게 Heroku에 데이터베이스를 마이그레이션하지 않은 것을 할 상상

Any guess? 

DB.

개발 환경이 "단지"레일즈 애플리케이션이라고 가정하는 것은 일반적인 문제입니다. 그 이상의 것입니다. 당신도, 당신의 프로덕션 데이터베이스는 당신이 당신의 레일 DB에있는 동일한 데이터로 채워집니다 확인해야

나는이 일이 있는지 확인합니다 :

$ Heroku가 실행 레이크 DB가 :

마이그레이션을

-

디버그

교활한 속임수에 "디버그" Heroku에서 실제로 귀하의 응용 프로그램을 "개발"모드로 실행하는 것입니다.

#config/environments/production.rb 
config.consider_all_requests_local = true # false 

변경 Heroku가 &이 다시 밀어 후 : 당신은 당신이 다음을 수행하는 경우,이 오류가 제대로 무엇을 보여줄 것이다, 이후 생산 모드에서 실행으로 다시 전환 할 수 있도록해야하지만 화면에 자세한 오류 버전이 표시됩니다. 데이터베이스에 올바른 열이 없다고 가정합니다)

+1

데이터베이스를 마이그레이션했습니다. 이것은 내 문제를 해결했다. 오류는 기기에서 비롯됩니다. 감사 ! – Aeradriel

0

로그

2014-09-13T06:28:34.201030+00:00 heroku[router]: at=info method=POST path="/users" host=birdl-dev.herokuapp.com request_id=c1e7ab4c-68dd-433e-8f26-870c2392ab3e fwd="24.50.121.235" dyno=web.1 connect=1ms service=772ms status=500 bytes=1335 

에서이 줄은 예외가 일어나고 있음을 말하고있다. 당신의 production.rb

config.log_level = :debug 

에서 설정을 시도하고 로그에 예외 역 추적을 확인하기 위해 서버를 다시 시작합니다.

1

또한 config.action_mailer.default_url_optionsconfig/environments/production.rb에 설정하고 메일러를 설정하는 것을 잊지 마십시오. 또는 아직 메일러를 설정할 준비가되지 않은 경우 config.action_mailer.perform_deliveries = false으로 설정하십시오.