blob: dc47a35ff3c4123d1de3bc8620c9216d1cd68342 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 %>
|