From 6813edc7d926965e5644cd8befaf229a35b9d8ca Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Sat, 28 May 2016 22:04:13 +0200 Subject: Initial command structure. --- railties/lib/rails/commands/runner/USAGE | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 railties/lib/rails/commands/runner/USAGE (limited to 'railties/lib/rails/commands/runner/USAGE') diff --git a/railties/lib/rails/commands/runner/USAGE b/railties/lib/rails/commands/runner/USAGE new file mode 100644 index 0000000000..dc47a35ff3 --- /dev/null +++ b/railties/lib/rails/commands/runner/USAGE @@ -0,0 +1,17 @@ +Examples: + +Run `puts Rails.env` after loading the app: + + <%= executable %> 'puts Rails.env' + +Run the Ruby file located at `path/to/filename.rb` after loading the app: + + <%= executable %> path/to/filename.rb + +<% if RbConfig::CONFIG['host_os'] !~ /mswin|mingw/ %> +You can also use the runner command as a shebang line for your executables: + + #!/usr/bin/env <%= File.expand_path(executable) %> + + Product.all.each { |p| p.price *= 2 ; p.save! } +<% end %> -- cgit v1.2.3