Shiny buildpack for Heroku (now with images)

641 views
Skip to first unread message

Brent Tubbs

unread,
Nov 5, 2013, 12:28:40 AM11/5/13
to shiny-...@googlegroups.com
Thank you to those who offered suggestions to my problem of images not working in my Heroku Shiny environment.  It turned out to be a combination of Cairo not being compiled in to my custom build or enabled in .Rprofile.

Those things are now fixed, and you can see a running sample app, with images, at http://shiny-example-1.herokuapp.com/.

I've also packaged up a Shiny-specific buildpack, so you can deploy an app to Heroku with just a ui.R and server.R in your repository.  See https://github.com/btubbs/heroku-buildpack-shiny.

I'm more a devops hacker than an R expert, so there may be subtleties to the R environment that I'm oblivious to and that still aren't quite right.  Let me know if you find any.

Ramnath Vaidyanathan

unread,
Nov 5, 2013, 11:05:53 AM11/5/13
to shiny-...@googlegroups.com
This is cool. Can this be used with the free-pricing tier of Heroku, or does it only work with one of the paid tiers?

Secondly, are there any advantages deploying to Heroku vs. deploying on Amazon EC2?

Brent Tubbs

unread,
Nov 5, 2013, 11:36:50 AM11/5/13
to shiny-...@googlegroups.com
The demo apps I've put up are on the free tier, so I know it works there.

That's one advantage over EC2: no cost to just experimenting with something.

The other is that you don't have to install anything anywhere or administer a server.  You just write your app and push it.

Ramnath Vaidyanathan

unread,
Nov 5, 2013, 1:24:31 PM11/5/13
to shiny-...@googlegroups.com
Nice. So just to make sure I am clear, this buildpack works by installing R and running the application as you would do so using runApp on your Desktop.

Is that what you mean when you say that it does not use Shiny-Server?

If yes, can anyone elaborate on the pros and cons of this approach?

Brent Tubbs

unread,
Nov 5, 2013, 4:34:22 PM11/5/13
to shiny-...@googlegroups.com


On Tuesday, November 5, 2013 10:24:31 AM UTC-8, Ramnath Vaidyanathan wrote:
Nice. So just to make sure I am clear, this buildpack works by installing R and running the application as you would do so using runApp on your Desktop.

Is that what you mean when you say that it does not use Shiny-Server?

That's correct.
 

If yes, can anyone elaborate on the pros and cons of this approach?

Shiny-server and Heroku are playing similar roles here; letting you run your app in a way that lets others see it in their browsers too.

I don't know much about shiny server, so I can't say what it adds that Heroku might be missing.  One thing I've read is that shiny server maintains the websocket connection between itself and the shiny app, so people interacting with shiny server don't have to be using websockets.  So shiny server ought to support users on IE9 and earlier, while using this buildpack would not.

Heroku's websocket support is in beta.  I've noticed that if you visit http://shiny-example-1.herokuapp.com/ and leave it alone for a while, a translucent gray overlay covers the screen and you need to refresh the page before you can interact with it again.  I don't know if this is a quirk in Shiny itself or in Heroku's websockets implementation (which is in beta).

Mark Silverberg

unread,
Aug 29, 2015, 1:40:14 PM8/29/15
to Shiny - Web Framework for R
Has this been working recently for anyone? I get the following errors:









2015-08-29T17:37:25.238729+00:00 heroku[web.1]: Starting process with command `R -e "shiny::runApp('.', as.numeric(Sys.getenv(\"PORT\")))"`


2015-08-29T17:37:27.750707+00:00 app[web.1]: WARNING: ignoring environment value of R_HOME


2015-08-29T17:37:27.828305+00:00 app[web.1]: /app/vendor/R/lib64/R/bin/exec/R: error while loading shared libraries: libreadline.so.5: cannot open shared object file: No such file or directory


2015-08-29T17:37:28.754435+00:00 heroku[web.1]: State changed from starting to crashed


2015-08-29T17:37:28.755738+00:00 heroku[web.1]: State changed from crashed to starting


2015-08-29T17:37:28.736601+00:00 heroku[web.1]: Process exited with status 127


2015-08-29T17:37:37.546564+00:00 heroku[web.1]: Starting process with command `R -e "shiny::runApp('.', as.numeric(Sys.getenv(\"PORT\")))"`


2015-08-29T17:37:39.876701+00:00 app[web.1]: /app/vendor/R/lib64/R/bin/exec/R: error while loading shared libraries: libreadline.so.5: cannot open shared object file: No such file or directory


2015-08-29T17:37:39.824301+00:00 app[web.1]: WARNING: ignoring environment value of R_HOME


2015-08-29T17:37:40.730542+00:00 heroku[web.1]: State changed from starting to crashed


2015-08-29T17:37:40.717401+00:00 heroku[web.1]: Process exited with status 127

Reply all
Reply to author
Forward
0 new messages