Is it possible to call a task which is defined in a Rakefile
- not in somefile.rake
- from an other Ruby script?
I was hoping that creating a n
You forgot to add your new rake
to the current Rake Application:
$LOAD_PATH.unshift File.dirname(__FILE__)
require 'rake'
require 'pp'
rake = Rake::Application.new
Rake.application = rake
rake.init
rake.load_rakefile
rake[:hello].invoke
or just
$LOAD_PATH.unshift File.dirname(__FILE__)
require 'rake'
require 'pp'
Rake.application.init
Rake.application.load_rakefile
Rake.application[:hello].invoke