method that runs an executable file

M

Michael Wright

hello,

i am quite new to programming, only began in february this year and am
doing a project for my uni course.

me and my group are using ruby on rails and were wondering if it is
possible to create a method that when run, gets a rakefile to execute a
database migrate?

would greatly appreciate any help here
 
B

brabuhr

hello,

i am quite new to programming, only began in february this year and am
doing a project for my uni course.

me and my group are using ruby on rails and were wondering if it is
possible to create a method that when run, gets a rakefile to execute a
database migrate?

would greatly appreciate any help here

There are several general ways in Ruby to launch an external command:
http://pasadenarb.com/2007/03/ruby-shell-commands.html

Though, be aware, particularly for web apps, of potential security
issues that can be introduced:
http://www.owasp.org/index.php/Command_Injection
http://en.wikipedia.org/wiki/Code_injection#Shell_injection
 
M

Michael Wright

unknown said:
There are several general ways in Ruby to launch an external command:
http://pasadenarb.com/2007/03/ruby-shell-commands.html

Though, be aware, particularly for web apps, of potential security
issues that can be introduced:
http://www.owasp.org/index.php/Command_Injection
http://en.wikipedia.org/wiki/Code_injection#Shell_injection

thank you,

i have never used IRB before so am a little unfamiliar with the coding
on the page, it is still helpful though. i shall try to work through it
and get a method created for executing a rakefile.

regards,
mike
 

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
474,169
Messages
2,570,920
Members
47,464
Latest member
Bobbylenly

Latest Threads

Top