2017-02-18 3 views
0

のためのサンドボックスモードを持っている5い私はrails c ––sandboxはレールがコンソール

でコンソールを実行してみました。しかし、端末は、それが箱から出して働いていたバージョンをレール古いで

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

確かに...私はダッシュを何度も試みていなかったので、ダッシュ(残念ながら)を言及しているコードスクールブログを見つけました。私はそれが変更されたと思ったコピー貼り付け後、またはそう...ありがとう.. – Abhilash