yihui / blogdown-jekyll

Automatically knit R Markdown documents, build them with Jekyll, and serve the website with servr locally
https://jekyll.yihui.org
MIT License
205 stars 162 forks source link

R Studio Can't Find Jekyll #15

Open ghost opened 8 years ago

ghost commented 8 years ago

I have read a lot on using R studio with Jekyll. I am trying to get this set up as described here: https://github.com/yihui/knitr-jekyll

Jekyll works fine from the command prompt for me. I just cant get it to work with R studio.

which ruby from Terminal: /Users/chrislevy/.rvm/rubies/ruby-2.2.4/bin/ruby

which jekyll from Terminal:

/Users/chrislevy/.rvm/gems/ruby-2.2.4/bin/jekyll

echo $PATH from Terminal:

/Users/chrislevy/.rvm/gems/ruby-2.2.4/bin:/Users/chrislevy/.rvm/gems/ruby-2.2.4@global/bin:/Users/chrislevy/.rvm/rubies/ruby-2.2.4/bin:/Users/chrislevy/anaconda/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Library/TeX/texbin:/Users/chrislevy/.rvm/bin

I just cant get R studio to find jekyll (at least I think thats the problem).

I am using servr::jekyll() and I get the same error as reported here: http://stackoverflow.com/questions/31091443/r-servrjekyll-build-error

I have tried all the solutions listed there, even by giving the direct path for Jekyll in the servr::jekyll(command = )

Within R studio:

system("which jekyll") --> (returns an empty string so Im assuming it cant find it)

Sys.getenv('PATH') --> /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Library/TeX/texbin

system("which ruby") --> /usr/bin/ruby

I think it all has something to do with $PATH. I am bit of a noob when it comes to stuff like this. I installed jekyll through ruby rvm. A long while back when I was even more of a noob I may of installed ruby through some sort of sudo command or something so I hear that can mess things up.

yihui commented 8 years ago

Hopefully you will see some good news in a few weeks -- I have been working full time on a new R package for creating websites (including blogs) using R Markdown. I have suffered enough from Jekyll myself, and the pain should no longer exist after the new package is released.

ghost commented 8 years ago

This is really exciting news and I can not wait to hear more about this. Thanks so much for the quick response. I am using so many of your tools for dynamic documents right now. It has made writing/presenting fun again. Keep up the awesome work.

ghost commented 7 years ago

Above you said you will hopefully have some good news. Is Blogdown the answer? Cheers!

yihui commented 7 years ago

Yes, but as I said in the README of blogdown, it is still in early beta. If you are willing to digest the Hugo documentation (I don't think it is a very easy read and I read it several times myself), you are pretty much ready to go now.