Enter your password to install the bundled RubyGems to your system

5,730 views
Skip to first unread message

adamp

unread,
Aug 2, 2011, 1:38:41 AM8/2/11
to Capistrano
Hi Folks,

I'm new to Capistrano and am having problems. I run:

> cap deploy

from my development machine.

A bunch of output scrolls by and finally I see line that prompts me
for a password. It outputs:

** [out :: blah.blah.com] Enter your password to install the bundled
RubyGems to your system:

I type in the password for that users account I run from and nothing
happens. The script appears to just hang there waiting for something
to happen.

How do I get the RubyGems installed properly so that I can get by this
step in the deployment process.

Thank,
Adam

Lee Hambley

unread,
Aug 2, 2011, 4:23:10 AM8/2/11
to capis...@googlegroups.com
Adam,

Bundler is unable to write to your Rubygems (GEM_HOME) directory, and is asking for your `sudo` password, you should check the bundler docs, and/or rvm if appropriate, and find out how to install to a shared location.

If you are on Ubuntu, (as far as I know, but please check) you are out of luck… you'll have to jump through some hoops to get it to work, in this case I recommend using RVM.

- Lee

Donovan Bray

unread,
Aug 2, 2011, 11:23:50 AM8/2/11
to capis...@googlegroups.com
Run the bundle command with the 'sudo' helper instead of the 'run' helper.

> --
> * You received this message because you are subscribed to the Google Groups "Capistrano" group.
> * To post to this group, send email to capis...@googlegroups.com
> * To unsubscribe from this group, send email to capistrano+...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en

Lee Hambley

unread,
Aug 2, 2011, 1:07:02 PM8/2/11
to capis...@googlegroups.com
Using `sudo` to install gems is a bad idea, because ubuntu is "broken" out of the box, you should fix your system Ruby installation; it's broken for a reason; and you should never run production applications on your host machine's distributed Ruby.

Ubuntu don't ship Ruby as a convenience for users, but as a requirement for some of their internal script, installing Gems into the Ubuntu core paths *can* break your OS… that's why RBV and /usr/local exist.

Donovan's solution will work, but you shouldn't do it. If you don't know why you shouldn't do it, ask a sysadmin. (and then, do whatever works for you, but be certain to understand the *potential* problems you will introduce if you start using sudo to install Ruby Gems with)

Donovan Bray

unread,
Aug 2, 2011, 10:04:58 PM8/2/11
to capis...@googlegroups.com
Lee makes a good point it was a knee-jerk answer on my part.  Why aren't you doing 'bundle install --deployment' which totally avoids the issue. 

Bundler comes with canned capistrano support if you require it in your deploy.rb. 
--
Reply all
Reply to author
Forward
0 new messages