2016-10-01 113 views
0

我剛剛部署了我的rails網站到Heroku,它運行良好。那麼現在的問題是我無法在localhost:3000上打開我的網站。這表明Localhost:3000很抱歉,但出現了一些問題

We're sorry, but something went wrong. 

If you are the application owner check the logs for more information. 

這是我從$得到了日誌軌控制檯日誌,我不知道該怎麼做,恐慌將使最差。任何幫助表示讚賞!

config.eager_load is set to nil. Please update your config/environments/*.rb files accordingly: 

    * development - set it to false 
    * test - set it to false (unless you use a tool that preloads your test environment) 
    * production - set it to true 

C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/connection_specification.rb:236:in `resolve_symbol_connection': 'log 
s' database is not configured. Available: ["default", "development", "test", "production"] (ActiveRecord::AdapterNotSpecified) 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/connection_specification.rb:217:in `resolve_connection' 

     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/connection_specification.rb:138:in `resolve' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/connection_specification.rb:168:in `spec' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activerecord-5.0.0.1/lib/active_record/connection_handling.rb:53:in `establish_connection' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activerecord-5.0.0.1/lib/active_record/railtie.rb:125:in `block (2 levels) in <class:Railtie>' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:44:in `each' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activerecord-5.0.0.1/lib/active_record/base.rb:324:in `<module:ActiveRecord>' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activerecord-5.0.0.1/lib/active_record/base.rb:24:in `<top (required)>' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activerecord-5.0.0.1/lib/active_record/railtie.rb:53:in `block in <class:Railtie>' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/railtie.rb:226:in `call' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/railtie.rb:226:in `block in run_console_blocks' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/railtie.rb:247:in `each' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/railtie.rb:247:in `each_registered_block' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/railtie.rb:226:in `run_console_blocks' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/application.rb:463:in `block in run_console_blocks' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/engine/railties.rb:13:in `each' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/engine/railties.rb:13:in `each' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/application.rb:463:in `run_console_blocks' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/engine.rb:442:in `load_console' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/commands/console.rb:34:in `initialize' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/commands/console_helper.rb:9:in `new' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/commands/console_helper.rb:9:in `start' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:78:in `console' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/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.0.1/lib/rails/commands.rb:18:in `<top (required)>' 
     from bin/rails:4:in `require' 
     from bin/rails:4:in `<main>' 
+1

在導軌控制檯中。 –

回答

0

問題是您沒有配置數據庫。

數據庫未配置。可用:[「默認」,「開發」,「測試」,「生產」](ActiveRecord :: AdapterNotSpecified)

請配置它在database.yml文件。 Cofiguring a database - Rails guides

相關問題