Method that runs an executable file

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

On Tue, Aug 4, 2009 at 10:25 AM, Michael W.[email protected]
wrote:

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

unknown wrote:

On Tue, Aug 4, 2009 at 10:25 AM, Michael W.[email protected]
wrote:

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

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs