julia deprecated types?
i2000s opened this issue · 3 comments
Hi Yihui,
I tried to use knitr with the Julia engine, and encountered some strong errors with Julia 4.5. Hopefully you can help solve this issue.
The output of error is below:
$ Rscript -e "servr::jekyll(command='~/.rvm/gems/ruby-2.3.0/wrappers/jekyll build')"
WARNING: int(s::AbstractString) is deprecated, use parse(Int,s) instead.
in depwarn at ./deprecated.jl:73
while loading /home/qxd/R/x86_64-pc-linux-gnu-library/3.2/runr/lang/julia_socket.jl, in expression starting on line 4
ERROR: LoadError: listen: address already in use (EADDRINUSE)
in listen at ./socket.jl:694
while loading /home/qxd/R/x86_64-pc-linux-gnu-library/3.2/runr/lang/julia_socket.jl, in expression starting on line 4
In the .Rmd file, I basically followed your template to have the r setting as below (first a few lines of the file):
library(knitr)
library(runr)
j = proc_julia()
j$start()
knit_engines$set(julia = function(options) {
knitr:::wrap(j$exec(options$code), options)
})
Insights? Thanks.
I'm not a Julia expert, but I guess I just fixed the type warning. The actual error seems to be due to the fact that the default port is used, so perhaps you can use a different port in proc_julia()
.
Thank you for the quick fix! It can now run the code. I changed the port to 8000, but still got the following error--which seems relates to the rvm installation. Could you give a hint on it as I'm not familiar with ruby?
$ servr::jekyll(command = '~/.rvm/gems/ruby-2.3.0/bin/jekyll build')
/usr/bin/env: ‘ruby_executable_hooks’: No such file or directory
Error in jekyll_build() :
Failed to run: ~/.rvm/gems/ruby-2.3.0/bin/jekyll build
I have tried everything I can search directly from the error. Thanks.
Sorry I'm not a Ruby expert and I don't understand the error message, either.