11

I'm running into an issue when building the following package: https://github.com/yoni/rbundler

My test attempts to run rbundler's bundle command on a trivial package which has a single dependency. The test passes on my OSX machine, but fails on my x86_64-redhat-linux-gnu Jenkins server. Both machines are running R 2.15.1 with devtools 0.7.1, which includes this bug fix.

The full test output can be found in this gist.

Here's a short summary of error I'm seeing:

Error in file(filename, "r", encoding = encoding) : 
  cannot open the connection
Calls: local ... eval.parent -> eval -> eval -> eval -> eval -> source -> file
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
  cannot open file 'startup.Rs': No such file or directory
Execution halted

The background for this is that I'm trying to build a dependency management system for R. The idea is that an R project should be able to run without using system-wide or user-wide libraries. Rather, the R project will have it's own library installed under it's root directory.

For my previous Stack Overflow question related to Dependency Management in R, see Dependency management in R

2 Answers 2

7

In my case this issue was caused by the environment variable R_TESTS that was set to startup.Rs

When you execute another R process from within your tests (in my case it was submitted via OGS qsub), the presence of this environment variable causes issues.

1
  • 3
    To follow up, the solution is then to unset the variable with Sys.setenv("R_TESTS" = "")
    – Andrew M
    Sep 29, 2016 at 23:01
0

I can't answer your question directly, but two things you can try get more information about what is happening.

  1. use 'env' to dump environment variables on your OSX machine and the Jenkins host
  2. run the process through strace on Linux and dtruss on OSX to trap the system calls

strace/dtruss should reveal the places in which it is searching for startup.Rs and env output will likely give you a environment variable that differs between the system accounting for the different outcome.

1
  • Thanks for the debugging suggestions. I originally tried #1 and never really figured out the issue. Haven't tried the process traces yet.
    – yoni
    Sep 19, 2012 at 22:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.