debian-mirror-gitlab/debian/gems-compat/railties-5.1.6.1/lib/rails/commands/runner/USAGE

17 lines
432 B
Text

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
<% unless Gem.win_platform? %>
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 %>