diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-05-28 22:04:13 +0200 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2016-09-25 21:31:35 +0200 |
commit | 6813edc7d926965e5644cd8befaf229a35b9d8ca (patch) | |
tree | 05732c004c68475cb6bd5794d87e030096d4d75c /railties/lib/rails/commands/runner/USAGE | |
parent | b724dbbb8b337d84a3ca8380c9dd75d79a44badf (diff) | |
download | rails-6813edc7d926965e5644cd8befaf229a35b9d8ca.tar.gz rails-6813edc7d926965e5644cd8befaf229a35b9d8ca.tar.bz2 rails-6813edc7d926965e5644cd8befaf229a35b9d8ca.zip |
Initial command structure.
Diffstat (limited to 'railties/lib/rails/commands/runner/USAGE')
-rw-r--r-- | railties/lib/rails/commands/runner/USAGE | 17 |
1 files changed, 17 insertions, 0 deletions
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 %> |