cloudyr / googleComputeEngineR

An R interface to the Google Cloud Compute API, for launching virtual machines
https://cloudyr.github.io/googleComputeEngineR/
Other
152 stars 41 forks source link

Error in loadNamespace(name) - fixed #116

Closed izzetagoren closed 5 years ago

izzetagoren commented 5 years ago

Following the command

vm <- gce_vm(template = "rstudio", name = "rstudio-team", username = "rauxa", password = "ThisIsNotaPassword", predefined_type = "f1-micro")

I kept getting the following error:

2018-11-21 10:31:14> Creating template VM Error in loadNamespace(name) : there is no package called ‘testthat’

Using predefined_type = "highmem-2" resulted in the same error.

installing tidyverse and testthat, including dependencies solved the problem and I was able to successfully log in the rstudio server vm.

Environment: Mac Mohave 10.14, rStudio 1.1.456

MarkEdmondson1234 commented 5 years ago

Many thanks for this. I think the long term fix is to replace the testthat function used here:

https://github.com/cloudyr/googleComputeEngineR/blob/7f17fae9cb0cd41fd26edce256218f6bdd75aff3/R/metadata.R#L80

Keep testhat just for the tests and keep it in the Suggests.