I'm creating an application which requires migrations without rails. For that I have created a rake file to execute commands.
My problem is how can I call a ruby class function from a rake file. I want something like this. consider both are in the same directory
class A
def b
puts 'calling method B from class A'
end
end
in the RakeFile
task :create do
A.new.b
end
I want to execute it as
rake create
But currently I'm getting this error
rake aborted!
no such file to load -- a
I'm using ruby 1.9.1, rake (0.8.7)
thanks in advance
cheers
sameera