I have a Rails server which will need to run a python script at the background. I know that I can run it like I run terminal commands in ruby, but how is the performance like? is it better to use a python framework and not Rails? Is there better ways (optimization wise) to run python scripts on a Rails server?
You will incur the cost of starting python each time you run it from ruby.  The cost would be the same in a python framework, unless you could use the python script as a library instead.
How to run a python script on a Rails server?