rstudio / sortable

R htmlwidget for Sortable.js
https://rstudio.github.io/sortable/
Other
134 stars 29 forks source link

Sortable is not defined #3

Closed ghost closed 8 years ago

ghost commented 8 years ago

I'm trying to recreate the Shiny app you demonstrated in your blog and have been able to successfully do so on a local Windows machine. However, when trying to run the exact same code on a Linux server, I get an error in the console:

ReferenceError: Sortable is not defined
.renderValue()      sortableR.js:23
window.HTMLWidgets.staticRender/</<()    htmlwidgets.js:625
forEach()    self-hosted:232
forEach()    htmlwidgets.js:55
window.HTMLWidgets.staticRender/<()   htmlwidgets.js:551
forEach()   self-hosted:232
forEach()   htmlwidgets.js:55
window.HTMLWidgets.staticRender()    htmlwidgets.js:549
<anonymous>    htmlwidgets.js:638

Here is my session information:

> devtools::session_info()
Session info -------------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.3.1 (2016-06-21)
 system   x86_64, linux-gnu           
 ui       RStudio (0.99.903)          
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       posixrules                  
 date     2016-09-09 

Packages -----------------------------------------------------------------------------------------------------------------
 package          * version    date       source                                    
 AnomalyDetection * 1.0        2016-08-31 Github (twitter/AnomalyDetection@1f5deaa) 
 assertthat         0.1        2013-12-06 CRAN (R 3.3.1)                            
 colorspace         1.2-6      2015-03-11 CRAN (R 3.3.1)                            
 DBI              * 0.5        2016-08-11 CRAN (R 3.3.1)                            
 devtools           1.12.0     2016-06-24 CRAN (R 3.3.1)                            
 digest             0.6.10     2016-08-02 CRAN (R 3.3.1)                            
 dplyr            * 0.5.0.9000 2016-08-31 Github (hadley/dplyr@167b503)             
 DT               * 0.2        2016-08-09 CRAN (R 3.3.1)                            
 evaluate           0.9        2016-04-29 CRAN (R 3.3.1)                            
 formattable      * 0.2.0.1    2016-08-05 CRAN (R 3.3.1)                            
 ggplot2          * 2.1.0      2016-03-01 CRAN (R 3.3.1)                            
 ggthemes         * 3.2.0      2016-07-11 CRAN (R 3.3.1)                            
 ggvis            * 0.4.2.9000 2016-08-31 Github (rstudio/ggvis@d9cbbf5)            
 googleVis        * 0.6.0      2016-07-05 CRAN (R 3.3.1)                            
 gtable             0.2.0      2016-02-26 CRAN (R 3.3.1)                            
 htmltools          0.3.5      2016-03-21 CRAN (R 3.3.1)                            
 htmlwidgets      * 0.7        2016-08-02 CRAN (R 3.3.1)                            
 httpuv             1.3.3      2015-08-04 CRAN (R 3.3.1)                            
 jsonlite           1.0        2016-07-01 CRAN (R 3.3.1)                            
 knitr              1.14       2016-08-13 CRAN (R 3.3.1)                            
 leaflet          * 1.0.1      2016-02-27 CRAN (R 3.3.1)                            
 lubridate        * 1.5.6      2016-04-06 CRAN (R 3.3.1)                            
 magrittr           1.5        2014-11-22 CRAN (R 3.3.1)                            
 markdown           0.7.7      2015-04-22 CRAN (R 3.3.1)                            
 memoise            1.0.0      2016-01-29 CRAN (R 3.3.1)                            
 mime               0.5        2016-07-07 CRAN (R 3.3.1)                            
 munsell            0.4.3      2016-02-13 CRAN (R 3.3.1)                            
 plyr               1.8.4      2016-06-08 CRAN (R 3.3.1)                            
 R6                 2.1.2      2016-01-26 CRAN (R 3.3.1)                            
 RColorBrewer     * 1.1-2      2014-12-07 CRAN (R 3.3.1)                            
 Rcpp               0.12.6     2016-07-19 CRAN (R 3.3.1)                            
 RJSONIO            1.3-0      2014-07-28 CRAN (R 3.3.1)                            
 rmarkdown        * 1.0        2016-07-08 CRAN (R 3.3.1)                            
 RODBC            * 1.3-13     2016-04-14 CRAN (R 3.3.1)                            
 RSQLite          * 1.0.0      2014-10-25 CRAN (R 3.3.1)                            
 rstudioapi         0.6        2016-06-27 CRAN (R 3.3.1)                            
 scales             0.4.0      2016-02-26 CRAN (R 3.3.1)                            
 shiny            * 0.13.2     2016-03-28 CRAN (R 3.3.1)                            
 shinydashboard   * 0.5.1      2015-09-09 CRAN (R 3.3.1)                            
 shinyFiles       * 0.6.0      2015-03-26 CRAN (R 3.3.1)                            
 sortableR        * 0.1        2016-09-09 Github (timelyportfolio/sortableR@f3bcbb0)
 stringi            1.1.1      2016-05-27 CRAN (R 3.3.1)                            
 stringr            1.0.0      2015-04-30 CRAN (R 3.3.1)                            
 tibble             1.1        2016-07-04 CRAN (R 3.3.1)                            
 visNetwork       * 1.0.1      2016-06-20 CRAN (R 3.3.1)                            
 withr              1.0.2      2016-06-20 CRAN (R 3.3.1)                            
 xtable             1.8-2      2016-02-05 CRAN (R 3.3.1)                            
 yaml               2.1.13     2014-06-12 CRAN (R 3.3.1) 

Any thoughts on what might be going wrong? Thanks in advance!

timelyportfolio commented 8 years ago

very strange; my initial thought is case-sensitivity in the file name. Can you take a screenshot of the Sources window of your browser (Firefox or chrome) developer tools? I'll try to update to the newest sortable and use all lower-case and push to Github by the end of the weekend to see if that miraculously fixes the problem. Sorry for the trouble.

ghost commented 8 years ago

No need to apologize at all. Below are the screenshots you requested.

sources_window1

sources_windows2

sources_windows3

If these are not what you're looking for, or if you need more information, just let me know. Thanks again!

EDIT

It might be worth pointing out that these screenshots are from the Sources window for the app I'm actually building, not the example app from your blog, which might explain the abundance of sources included. Sorry for any confusion that might cause.

timelyportfolio commented 8 years ago

Would you mind trying reinstalling from Github? I changed everything to lowercase. Thanks.

ghost commented 8 years ago

That worked perfectly. Thank you for the quick turn around time!

timelyportfolio commented 8 years ago

Glad it worked. Please note, this was an early widget, so should be considered extra-alpha. I grimmaced quite a few times as I looked through the code.