Created
July 19, 2011 22:08
-
-
Save alexvbush/1093862 to your computer and use it in GitHub Desktop.
How to run Perl and Python scripts in a Rails app.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This will run Perl and Python scripts respectively in Rails console using 'gem escape'. Gem Escape allows to format path to the scripts properly. | |
perl_cmd = Escape.shell_command(['perl', "#{RAILS_ROOT}/bin/test_perl_script.pl"]).to_s | |
system perl_cmd | |
python_cmd = Escape.shell_command(['python', "#{RAILS_ROOT}/bin/test_python_script.py"]).to_s | |
system python_cmd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment