Running a script from a rake task?

S

Sean Hussey

Hi everyone,

I have 2 scripts (dbload.rb and import_people.rb) that I want to
include in a rake task. How can I run an external script in a rake
task? Do I have to shell out to do it? Or should I just make those
scripts rake tasks? For this dev environment, that might not be a bad
thing.

task :cleandb =3D> [:db_schema_import] do
# Run script/dbload.rb
# Run script/import_people.rb
end

This is in a Rails environment, but I don't think it's a Rails
specific question, so I'm posting here.

Thank you!

Sean
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top