Subin Tp
Subin Tp

Reputation: 91

How to run python script inside rails application in heroku?

I have a rails application hosted in heroku. I also wrote a web scraper using scrapy in python. I need to run the python script from the rails application in heroku,I will explain with an example.

Eg:The user will input the url to scrape in my rails app.Then the rails app give control to python script to scrape data which sends response as json object.Then we have to render the json result in the web app.I have to host this application in heroku.

Upvotes: 3

Views: 1819

Answers (1)

AahladParadigm
AahladParadigm

Reputation: 203

There is a great gem called rubypython. It embeds a running Python interpreter in the Ruby application.

FYI their homepage

Upvotes: 3

Related Questions