Hello World from OSS Silicon Valley
HowToUse/RubyOnRails/4.2/Heroku/2016/R/3.2
_ Prerequisite
- Ubuntu Server installation (You can refer HowToUse/UbuntuServer/14.04)
- Ruby On Rails setup on Heroku (You can refer HowToUse/RubyOnRails/4.2/Heroku/2015
_ HowToUse
- Step.1
- Prepare a new project, and add init.r to initialize R environment. You can refer sample of init.r here . In order to make a communication between Rails app and R server, you need to install Rserve-client or HowToUse/RubyOnRails/4.2/RinRuby/2.0.
- Step.2
- Create Heroku application.
$ heroku login $ heroku create <Application Name> --stack cedar-14 --buildpack https://github.com/virtualstaticvoid/heroku-buildpack-r.git#cedar-14
_ By 2015, we used heroku-buildpack-multi for multiple buildpacks, but we don't need it in 2016.
- Step.3
- Add buildpacks for rails to the project.
$ heroku buildpacks:add heroku/ruby
- Step.4
- Push the files to Heroku server.
$ git push heroku master
- Step.5
- Launch R server on Heroku.
$ heroku run R
_ Author
S.Yatsuzuka
Last-modified: 2016-05-27 (Fri) 07:15:44 (3192d)