2017-02-18 52 views
0

我試圖運行控制檯沙盒模式,但在終端引發此錯誤是否軌5具有由<code>rails c ––sandbox</code></p> <p>控制檯

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 

/home/workstation/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activerecord-5.0.1/lib/active_record/connection_adapters/connection_specification.rb:236:in `resolve_symbol_connection': '––sandbox' database is not configured. Available: ["default", "development", "test", "production"] (ActiveRecord::AdapterNotSpecified) 

在舊軌道,它的工作開箱即用的版本。所以它看起來像現在軌道不會有沙箱模式,或者我在這裏做錯了什麼?

回答

2

您正在使用破折號( - )而不是連字符( - )。這在Rails 5中有效。

rails c --sandbox 
+0

是的,這讓'rails c'認爲你想在一個名爲'--sandbox'的環境中啓動,這顯然沒有配置。 –

+0

確實...我用短跑幾次沒有運氣,然後我發現了一個codechool博客,提到破折號(不幸)以及。複製粘貼後,我認爲它已被改變或如此...非常感謝.. – Abhilash

相關問題