Tag: Rails4/バッチ処理
config.autoload_paths += %W(#{config.root}/lib) # 追加
class Tasks::HelloTask def self.execute print "Hello World!! env=#{Rails.env}\n" end end
bundle exec rails runner "Tasks::HelloTask.execute"