2013-12-14から1日間の記事一覧
「Rails.env」を使用すれば良い. case Rails.env when 'development' puts 'developmnent' when 'production' puts 'production'endif Rails.env.development? puts 'development'endif Rails.env.production? puts 'production'end※参考:http://memo.yomu…
rails sを実行時に,「You should not use the `match` method in your router without specifying an HTTP method. (RuntimeError)」とエラーが出た際には,routes.rbに「match」メソッドが含まれていることが原因.例えば, root :to => 'thread#index' ma…