shiny-server无法加载资源:服务器响应状态为500(内部服务器错误)

问题描述:

我在centos 6上使用shiny-server,它适用于大多数应用程序,但出现问题 当我使用它与rCharts(ggplot2是好的)。 chrome给我一条消息:“无法加载资源:服务器响应的状态为500(内部服务器错误)”,但我可以在本地Windows7系统上运行相同的代码,并且没有错误日志。它出什么问题了。 如果有朋友知道如何处理它,请告诉我,谢谢。shiny-server无法加载资源:服务器响应状态为500(内部服务器错误)

代码:

server.R

require(rCharts) 
shinyServer(function(input, output) { 
    output$myChart <- renderChart({ 
    names(iris) = gsub("\\.", "", names(iris)) 
    p1 <- rPlot(input$x, input$y, data = iris, color = "Species", 
     facet = "Species", type = 'point') 
    p1$addParams(dom = 'myChart') 
    return(p1) 
    }) 
}) 

#ui.R 
require(rCharts) 
shinyUI(pageWithSidebar(
    headerPanel("rCharts: Interactive Charts from R using polychart.js"), 

    sidebarPanel(
    selectInput(inputId = "x", 
    label = "Choose X", 
    choices = c('SepalLength', 'SepalWidth', 'PetalLength', 'PetalWidth'), 
    selected = "SepalLength"), 
    selectInput(inputId = "y", 
     label = "Choose Y", 
     choices = c('SepalLength', 'SepalWidth', 'PetalLength', 'PetalWidth'), 
     selected = "SepalWidth") 
), 
    mainPanel(
    showOutput("myChart", "polycharts") 
) 
)) 

是啊,我终于检查出来,因为我还没有改变应用程序的模式(ui.R和server.R)! 以可读的模式!在ui.R和server.R的chmod 755之后,它运行良好。