Binder built but getting 404

Hey everyone :wave:

I’m trying to create a Binder for my Rmarkdown project. I followed the instructions and created runtime.txt and install.R files and placed them inside a Binder subdirectory. I then waited for the Binder to build, got no error messages, but I’m getting a 404 error message. What am I doing wrong?

Thanks!
-Matan

I got this to work by using mybinder.org instead of gke.mybinder.org which I used before. But now I have a different question. The package papaja is not available on cran, so to install it one should run

library('devtools')
devtools::install_github("crsh/papaja")

I tried to put these lines in my install.R but this didn’t seem to work. What are my options, except for asking people to manually install it?

cheers,
-Matan

Yes, please always use mybinder.org. The development team want to control where traffic goes. Easiest is to use that tool to put a launch badge in your repo.

Shouldn’t what you put in install.R read like the following?:

install.packages("devtools")
library(devtools)
devtools::install_github("crsh/papaja")

That is the pattern I used here.

However, I don’t know if you need to even install and then invoke because worked here without installing devtools first. It probably gets installed and used earlier by repo2docker if it recognizes the R configuration files?

1 Like

Thanks!
I’m not sure what has happened, but it stopped working again :

(I’m not even installing papaja now)

No, it works, You aren’t using the link right though. The link you pasted in your last message is wrong and ends up at an erroneous endpoint. See here. (My next reply bellow spells out the URL you should use to launch to RStudio directly.)

To show you a way to troubleshoot and to get to RStudio from in an active, launched session:

Click to launch the link from your last message. From the URL that the link above launches where you see the 404 error, note the last three parts. Then in your address bar remove the rstudio and you’ll see you get the Jupyter dashboard. Then from the dashboard, you can choose on the right ‘New’ > ‘RStudio’. Note the difference at the end of the URL. You could have just removed tree from the original page your link opened and it would have got you to RStudio.

1 Like

Thanks Wayne!
So is there no way to directly link to Rstudio?

There is a way described in the directions you said in your first post that you followed, see here.

The syntax is critical for this.
You want to use the following:

https://mybinder.org/v2/gh/matanmazor/asymmetry/master?urlpath=rstudio

You had erroneously been using the following from your post above:

https://mybinder.org/v2/gh/matanmazor/asymmetry/HEAD?filepath=rstudio

Actually, I just verified that the following also works, and so the critical differences is the urlpath vs. filepath you had; however, my version above is more consistent with the current syntax in the documentation I referenced:

https://mybinder.org/v2/gh/matanmazor/asymmetry/HEAD?urlpath=rstudio
2 Likes

This is great, thanks Wayne!
One last question - is there a way to link directly to my file (binder/asymmetry_RR2.rmd) and have it opened in rstudio?
cheers

You’ve hit the extent of my RStudio and Binder knowledge. Or at least what I’m recalling today. I thought I’d seen this discussed, but I cannot find anything. I’d suggest making a new post about this.

1 Like