integrating R with Rsruby

后端 未结 3 678
失恋的感觉
失恋的感觉 2021-02-02 14:58

I was wondering if anyone possibly had any experience integrating R into Rails, specifically, on heroku. I am familiar with the rsruby gem, which is the de facto (perhaps only)

相关标签:
3条回答
  • 2021-02-02 15:20

    I created a Heroku Buildpack to make using R on Heroku a no-brainer.

    Checkout the heroku-buildpack-r for details.

    0 讨论(0)
  • 2021-02-02 15:29

    I use Rserve with a wrapper which simplifies the interface, called Rserve-simpler.
    http://rubygems.org/gems/rserve-simpler . It makes my life easier. I end up using R and Ruby together quite often.

    Here is a question where I've explained some usage. How to pass a ts object to R via RSRuby

    0 讨论(0)
  • 2021-02-02 15:43

    I explored R/Rails integration a couple of years ago, so my posts will be out of date by now. However, they're still available and might be useful if you want to read them:

    RSRuby and Rails revisited.

    One issue I encountered was a "stack smashing error" on terminating the development server, which made me nervous as to whether the project was worth pursuing.

    I have not tried deployment to Heroku. In principle, I like your idea of putting R in the Rails lib/, but I'm not sure if it would work.

    In general, I find that bridging other languages with R is troublesome. It might be better to keep the two separate, by running R on a server (using e.g. RApache) and passing data back/forth between that and the Rails app (e.g. as JSON). Another post that I wrote on that idea:

    Getting your web application and R(Apache) to talk to each other

    0 讨论(0)
提交回复
热议问题