If you’re developing with Rails you’ve probably encountered rake once or twice. This blog post aims to walk you through where rake came from and an introduction on how to use it effectively in your Rails apps. A Little Bit of History Rake is the project of Jim Weirich. It’s a build tool. For a good laugh and an even more in depth history check out the "rational.rdoc" from the Rake documentation. E
rakeタスク¶ environment環境の設定をロードしてからrakeタスクを実行したい場合¶ =>で:environmentの指定を付けることで、load_default_dataはRAILS_ENVで指定されている環境について実行されるようになる desc 'default configuration data' namespace :init do task :load_default_data => :environment do begin Club.destroy_all Club.create :name => '陸上競技部' Club.create :name => '洋弓部' Club.create :name => 'サッカー部' ski = Club.create :name => '競技スキー部' rescue => error puts "Error: "
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く