Can I install some ruby gem on a standard OS X user?

2

I have a Admin user for serious stuff and a Standard user for daily tasks, including front-end development. On the Admin user, I can install Brew, RVM, Middleman etc. But on the Stardard user, where I plan to develop using Middleman, I can't install because of the permissions stuff.

Is there a way to work around this?

If I try this: $ sudo gem install middleman I get this: JoelCipriano is not in the sudoers file. This incident will be reported.

If I try this: gem install middleman I get this: ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions into the /Library/Ruby/Gems/1.8 directory.

Joel Cipriano

Posted 2013-06-24T21:04:13.297

Reputation: 21

assume the root user, install/configure your software, drop back to the normal user. Is that not possible for some reason ? – None – 2013-06-24T21:07:48.200

I did this. Installed Brew, rbenv, rvm. Those three are working. But Middleman, don't. – Joel Cipriano – 2013-06-25T16:02:42.077

This is the the error when I try to install on the Standard user: ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions into the /Library/Ruby/Gems/1.8 directory. – Joel Cipriano – 2013-06-29T14:08:15.800

Answers

0

you've installed rvm in system mode, and thus rvm directs all gem installs to the system folder, where administrative privileges are needed.

You need to completely remove rvm, and then reinstall either rvm in user mode (not sure how, I just know it's possible from reading things.) or installing rbenv. Both those will put your ruby environment (and therefore the gems as well) in your home directory where administrative privileges are not needed.

Do mind that RVM and Rbenv DO NOT PLAY WELL TOGETHER. never under any circumstance install both. (I've had to wipe my iMac once after accidentally installing both.)

Homebrew is system centric, and you probably won't be able to install rvm/rbenv in user mode with that. I recommend using the general install guides from the developers instead.

Chris

Posted 2013-06-24T21:04:13.297

Reputation: 1