I am trying to use test-kitchen
, a tool to test chef (etc) cookbooks with virtual machines.
However when following the guide and doing kitchen init --driver=kitchen-vagrant
, I get the following error:
create .kitchen.yml
append Rakefile
create test/integration/default
append .gitignore
append .gitignore
Fetching: kitchen-vagrant-0.15.0.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /var/lib/gems/1.9.1 directory.
I am not running this as root. I am mostly a python programmer, and don't know much about the ruby ecosystem (and gem etc.). In python, with pip, you can use --user
to install python packages to the user's home directory. Or use a virtualenv
stored locally.
Other people have had similar problems, but the advise/accepted answer is sometimes to run this as root. I am not doing everything as root.
I am using Ubuntu Linux 14.04.1 trusty. I'd like to use vagrant for the VM (but I can change to another local VM system if needed).
Is there a standard method to install and use add-on Ruby gems from a user's home directory?