aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands/runner/USAGE
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2016-09-26 20:28:40 +0200
committerGitHub <noreply@github.com>2016-09-26 20:28:40 +0200
commitc994a893c18c0456fd2a30efe4debfc2b18e2508 (patch)
tree0253b1343a1760dc4701f7d2ee2ff8cdd1d1b290 /railties/lib/rails/commands/runner/USAGE
parenta6da7938017647dd6e19e23d3d47126cb7a3e1fe (diff)
parentc0c73738bd04c86fbcf6d22c961fec0d33aa2bf6 (diff)
downloadrails-c994a893c18c0456fd2a30efe4debfc2b18e2508.tar.gz
rails-c994a893c18c0456fd2a30efe4debfc2b18e2508.tar.bz2
rails-c994a893c18c0456fd2a30efe4debfc2b18e2508.zip
Merge pull request #26414 from rails/rails-commands
Initial Rails Commands Infrastructure
Diffstat (limited to 'railties/lib/rails/commands/runner/USAGE')
-rw-r--r--railties/lib/rails/commands/runner/USAGE17
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 %>