Closed qmwugbt112 closed 9 years ago
Try,
cd switch
sudo gem install bundler
bundle install --path .gem
This will install bundler as root, and the rest as your user in $PWD/.gem
.
I wonder if I should update the README right away or wait to push the gem release or brew recipe. @yannickwurm? This will likely be an issue for anyone using system ruby (default on MacOS and via package managers on Linux).
Its probably better to use sudo -s install bundler
since the user may not have the root password
sudo <command>
doesn't ask for root password, but of the user who invoked sudo
. sudo -s <command>
works the same, except it uses your login shell (bash/zsh/fish/...) to execute the command instead of sh
.
@yeban yes gem needs to be pushed asap - but name needs to be clarified first...
hmm … I don’t understand why it only worked with -s then
R
Richard Nichols Professor of Genetics http://goo.gl/5oUP2J
On 21 Jan 2015, at 18:04, Anurag Priyam notifications@github.com wrote:
sudo
doesn't ask for root password, but of the user who invoked sudo. sudo -s works the same, except it uses your login shell (bash/zsh/fish/...) to execute the command instead of sh. — Reply to this email directly or view it on GitHub.
Aha
There may be two relevant issues - 1) the default disabling of root user in OS X which got me in a muddle about passwords, and 2) because of some historical reason my terminal does not start up with a bash shell (I should probably fix that)- hence my first command was bash
I am presently unsure if the a) -s was necessary for the command to work because it will not work from my login shell b) sudo would have worked if I’d used my account password (which has admin privileges) but I never tried with the correct password
If (a) then perhaps other users might have a similar problem. I’ll investigate some more.
Richard
Richard Nichols Professor of Genetics http://goo.gl/5oUP2J
On 21 Jan 2015, at 18:04, Anurag Priyam notifications@github.com wrote:
sudo
doesn't ask for root password, but of the user who invoked sudo. sudo -s works the same, except it uses your login shell (bash/zsh/fish/...) to execute the command instead of sh. — Reply to this email directly or view it on GitHub.
This is probably a very naive error but here goes.
I've successfully installed boot2docker on an iMac/Yosemite and can run docker's hello-world, but for some reason I don't seem to have correct permissions to run the gem install command (and despite being an admin, at least at Mac OS X, I can't seem to chmod the files in question). Any advice please?
Session below
Last login: Wed Jan 21 17:00:58 on ttys000 [n56-170:~] rnichols% bash bash-3.2$ boot2docker start Waiting for VM and Docker daemon to start... .o Started. Writing /Users/rnichols/.boot2docker/certs/boot2docker-vm/ca.pem Writing /Users/rnichols/.boot2docker/certs/boot2docker-vm/cert.pem Writing /Users/rnichols/.boot2docker/certs/boot2docker-vm/key.pem
To connect the Docker client to the Docker daemon, please set: export DOCKER_HOST=tcp://192.168.59.103:2376 export DOCKER_CERT_PATH=/Users/rnichols/.boot2docker/certs/boot2docker-vm export DOCKER_TLS_VERIFY=1
bash-3.2$ export DOCKER_HOST=tcp://192.168.59.103:2376 bash-3.2$ export DOCKER_CERT_PATH=/Users/rnichols/.boot2docker/certs/boot2docker-vm bash-3.2$ export DOCKER_TLS_VERIFY=1 bash-3.2$ docker run hello-world Hello from Docker. This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash
For more examples and ideas, visit: http://docs.docker.com/userguide/
bash-3.2$ cd switch bash-3.2$ gem install bundler && bundle ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.