docker-sync: command not found

Viewed 4503
$ gem install docker-sync

ERROR: While executing gem ... (Errno::EACCES) Permission denied @ rb_sysopen - /usr/local/lib/ruby/gems/2.5.0/gems/docker-sync-0.5.9/Thorfile

$ sudo gem install docker-sync

Successfully installed docker-sync-0.5.9
Parsing documentation for docker-sync-0.5.9
Done installing documentation for docker-sync after 0 seconds
1 gem installed

$ docker-sync
-bash: docker-sync: command not found

I have tried to install docker-sync on my Mac OSX 10.14.2 but bash does never found the command. Also not after reboot. What can I do?

2 Answers

If only your user (let's call it user1) needs docker-sync, then I suggest you to install the gem for user user1 by running (as user1, not root) :

gem install --user-install docker-sync

Then, add docker-sync binary location (probably ~/.gem/ruby/<ruby_version>/bin) to your PATH :

export PATH=$PATH:~/.gem/ruby/<ruby_version>/bin

another version of this can be

gem install docker-sync --user-install -n /usr/local/bin

you will not have to export the path if you install this way

Related