Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
mongoidは、テストおよび本番環境のインデックスをどのように作成しますか?つまり
rake db:mongoid:create_indexes => environment
環境を設定する方法は?
私はモンゴイド2.4.9とレール3.2.7を使用しています。
Rails の他の rake タスクと同様に、コマンド ラインで rake する RAILS_ENV を指定するだけです。
rake db:mongoid:create_indexes RAILS_ENV=test
別のウィンドウでログ ファイルを追跡して、その発生を監視できます。
tail -f log/*.log