Error when deploying an app containing Ruchardet package (checking for Rscript... no)

36 views
Skip to first unread message

Dominique Emmanuel

unread,
Jul 17, 2018, 10:53:17 AM7/17/18
to shinyapps.io Users
Hi,

I'm trying to deploy on shinyapps.io an application containing the Ruchardet package (which is available on the CRAN), but I can't because I get an error...

Here is the simple application to deploy (see red part)  - a very simple app with library(Ruchardet) in it:
library(shiny)

# Define UI for application that draws a histogram
ui <- fluidPage(
   
   # Application title
   titlePanel("Old Faithful Geyser Data"),
   
   # Sidebar with a slider input for number of bins 
   sidebarLayout(
      sidebarPanel(
         sliderInput("bins",
                     "Number of bins:",
                     min = 1,
                     max = 50,
                     value = 30)
      ),
      
      # Show a plot of the generated distribution
      mainPanel(
         plotOutput("distPlot")
      )
   )
)

# Define server logic required to draw a histogram
server <- function(input, output) {
   library(Ruchardet)
   output$distPlot <- renderPlot({
      # generate bins based on input$bins from ui.R
      x    <- faithful[, 2] 
      bins <- seq(min(x), max(x), length.out = input$bins + 1)
      
      # draw the histogram with the specified number of bins
      hist(x, breaks = bins, col = 'darkgray', border = 'white')
   })
}

# Run the application 
shinyApp(ui = ui, server = server)



Here is the log (see red part) :
Preparing to deploy application...DONE
Uploading bundle for application: 382513...Detecting system locale ... DONE
Deploying bundle: 1484483 for application: 382513 ...
Waiting for task: 537695746
  building: Building package: Ruchardet
################################ Begin Task Log ################################ 
[2018-07-17T14:42:30.868777404+0000] Installing R package: digest (0.6.15)
* installing to library �/opt/R/3.4.1/lib/R/library�
* installing *binary* package �digest� ...
* DONE (digest)
[2018-07-17T14:42:31.090443467+0000] Installing R package: sourcetools (0.1.6)
* installing to library �/opt/R/3.4.1/lib/R/library�
* installing *binary* package �sourcetools� ...
* DONE (sourcetools)
[2018-07-17T14:42:31.336114169+0000] Installing R package: jsonlite (1.5)
* installing to library �/opt/R/3.4.1/lib/R/library�
* installing *binary* package �jsonlite� ...
* DONE (jsonlite)
[2018-07-17T14:42:31.628327586+0000] Installing R package: Rcpp (0.12.17)
* installing to library �/opt/R/3.4.1/lib/R/library�
* installing *binary* package �Rcpp� ...
* DONE (Rcpp)
[2018-07-17T14:42:32.723088586+0000] Installing R package: mime (0.5)
* installing to library �/opt/R/3.4.1/lib/R/library�
* installing *binary* package �mime� ...
* DONE (mime)
[2018-07-17T14:42:32.905368678+0000] Building R package: Ruchardet (0.0-3)
/mnt/packages/build /mnt
* installing to library �/opt/R/3.4.1/lib/R/library�
* installing *source* package �Ruchardet� ...
** package �Ruchardet� successfully unpacked and MD5 sums checked
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking whether make sets $(MAKE)... yes
checking for ranlib... ranlib
checking for Rscript... no
configure: error: Rscript not found, is R installed?
ERROR: configuration failed for package �Ruchardet�
* removing �/opt/R/3.4.1/lib/R/library/Ruchardet�
################################# End Task Log ################################# 
Erreur : Unhandled Exception: Child Task 537695747 failed: Error building image: Error building Ruchardet (0.0-3). Build exited with non-zero status: 1
De plus : Warning message:
Error detecting locale: Error in read.table(file = file, header = header, sep = sep, quote = quote, : incomplete final line found by readTableHeader on 'raw'
 (Using default: en_US) 
Ex�cution arr�t�e

The problem seems to comme from  "checking for Rscript... no" but I dont know how to solve it (while Ruchardet works fine on my laptop).


Any idea?

Best regards,
Dom

Dominique Emmanuel

unread,
Jul 17, 2018, 10:55:13 AM7/17/18
to shinyapps.io Users
For information :

> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252    LC_MONETARY=French_France.1252 LC_NUMERIC=C                  
[5] LC_TIME=French_France.1252    

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] graph_1.54.0        BiocGenerics_0.22.0

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.17       pillar_1.2.2       compiler_3.4.1     plyr_1.8.4         bindr_0.1          bitops_1.0-6      
 [7] viridis_0.5.1      tools_3.4.1        digest_0.6.15      tibble_1.4.2       gtable_0.2.0       viridisLite_0.3.0 
[13] pkgconfig_2.0.1    rlang_0.2.0        igraph_1.2.1       yaml_2.1.17        ggrepel_0.7.0      bindrcpp_0.2      
[19] gridExtra_2.3      dplyr_0.7.4        stats4_3.4.1       ggnet_0.1.0        grid_3.4.1         glue_1.2.0        
[25] R6_2.2.2           ggraph_1.0.1       bnclassify_0.3.4   RJSONIO_1.3-0      ggplot2_2.2.1.9000 tweenr_0.1.5.9999 
[31] farver_1.0         udunits2_0.13      magrittr_1.5       scales_0.5.0       MASS_7.3-47        units_0.5-1       
[37] rsconnect_0.8.5    assertthat_0.2.0   ggforce_0.1.1      colorspace_1.3-2   network_1.13.0.1   RCurl_1.95-4.8    
[43] lazyeval_0.2.1     munsell_0.4.3     

Joshua Spiewak

unread,
Jul 19, 2018, 8:38:40 AM7/19/18
to shinyapps.io Users
When we transitioned our base images to Xenial and added support for R 3.5.0, we missed getting Rscript on the path.

I have opened an issue to track fixing this, and would expect it to be deployed some time next week.

My apologies.

Joshua Spiewak

unread,
Jul 23, 2018, 5:42:39 PM7/23/18
to shinyapps.io Users
Could you try again and let me know what happens please?
Reply all
Reply to author
Forward
0 new messages