Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rstudio and Google Drive Syncing Problems: "The process cannot access the file because it is being used by another process"

So I'm using RStudio and storing my files on Google Drive (the version with folders on your system, acting like Dropbox). I'm using it because it provides a lot more space for free than Dropbox, and I need that space for the projects I'm working on.

When I attempt to write any document at all -- an R script, an RMarkdown file, etc... -- I get the error mentioned in the title. This doesn't happen using Dropbox. I have found answers for this question for Dropbox, but the solution (tell Dropbox not to sync the Rproj file) doesn't seem applicable to Google Drive (if it is, please correct me).

Currently, I'm pausing Google Drive, which is fine, but I often forget to resume it and that causes headaches.

Thanks for your help!

like image 383
jpm_phd Avatar asked Jun 14 '16 19:06

jpm_phd


1 Answers

EDIT: On further use of RStudio my solution didn't solve it - The sync popup just occurs at a lower frequency. The problem is that Google Drive currently doesn't have a feature to ignore Folders just filetypes.

--

This solved it for me:

  1. In Google Drive/Backup and Sync go to Preferences...
  2. Under My Computer click Change:
  3. Under Ignore files with these extensions add .rproj.user

See screenshots below:

Step 1

Step 2

Step 3

like image 137
Oliver Oliver Avatar answered Sep 20 '22 13:09

Oliver Oliver