Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
A Rake executable script, is this the correct approach
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="John Pywtorak, post: 4533747"] I humbly come to you, because searching, mostly google, has failed to produce a reference, or someone who has done this. We traditionally run Rakefile's using either $ rake or $ rake -f my.rake etc what if I wanted an executable script, say myscript, which is really a rake task file, but runs as though it where run as above. Attempt 1 #!/usr/bin/env rake task :default do puts "Hello, Rake!" end FAILED Attempt 2 #!/usr/bin/env ruby task :default do puts "Hello, Rake!" end Rake::Task[:default].invoke SUCCESS So, is the latter really the best way? While it works I worry that rake is somehow not setup the same way if the this had been run the traditional way. Thanks -- Windows Start Here Frustrating Hanging Crashing Blue Screen of Death Reboot [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
A Rake executable script, is this the correct approach
Top