2

I want to install a Ruby Gem to my computer, but since I don't have an administrator account I can't use sudo. How do I install a Gem without sudo, and what (if any) privileges do I loose? This is in reference to this question I asked on Stack Overflow.

Update:

I installed RVM, but I got these two errors:

WARNING: your RVM loading script `/etc/profile.d/rvm.sh` is deprecated
and causes you to have `umask g+w` set in your shell,
run `rvm get head --auto-dotfiles` again to fix your scripts.

And

WARNING: You have '~/.profile' file, you might want to load it,
to do that add the following line to '/Users/CalebKleveter/.bash_profile':

  source ~/.profile

I ran rvm get head --auto-dotfiles, but I got the same errors again. Any suggestions on what to do? And what does the second error message want me to do?

Update 2:

I tried gem install cocoapods and I got the error in my other post, then I tried rvm gem install cocoapods and I got "Please note that rvm gem ... was removed, try gem install cocoapods or rvm all do gem install cocoapods instead. ( see: 'rvm usage' )" so I tried rvm all do gem install cocoapods and it just started a new command prompt, that is what is supposed to happen, right?

7
  • I actually use rvm. It installs ruby into your home folder, so you don't need sudo. It works fine for me. Try that, and if it works I'll post it as an answer. Commented Oct 5, 2015 at 16:02
  • @IronCraftMan, if you look at the link you will notice I tried to install RVM, but it didn't work. "The other solution of installing RVM I looked into, but I had trouble installing it. (Maybe because I'm not an admin?)", Can you go over how to install RVM? Commented Oct 5, 2015 at 16:10
  • By "some errors again" do you meant the same ones as before? Commented Oct 6, 2015 at 0:46
  • @IronCraftMan, Yes. Commented Oct 6, 2015 at 1:55
  • can you run gem install (yourgem) Commented Oct 6, 2015 at 2:06

2 Answers 2

3

RVM:

From the rvm.io homepage, I used: \curl -sSL https://get.rvm.io | bash -s stable . This worked fine for me, no admin permissions needed.

1
  • Sorry about my delay. I added an update to my post. Commented Oct 5, 2015 at 23:41
1

I want to install a Ruby Gem to my computer, but since I don't have an administrator account I can't use sudo. How do I install a Gem without sudo, and what (if any) privileges do I loose?

Yes, use the --user-install flag, which will install gems into your local directory.

gem install jekyll --user-install

This will make them only accessible to you, not to other users on the machine. You may need to add the bin directory into your PATH; if so, gem install will tell you.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .