bundle install question

Having a problem...

I am working on a project where I am using bundle & Gemfile and it's
working OK. The gems are all installed and a few git based gems are in
my ~/.bundler/ruby/1.8 directory which is OK I guess.

When I did an svn commit and checked it out on another user's account, I
then ran 'bundle install' from his account and even though all of the
regular gems were already installed and accessible, the bundle command
asked for his password for each gem (trying to escalate privileges) and
I finally gave the user sudo privileges out of frustration. That clearly
is not a good working methodology... I don't want him to have sudo
privileges (I could grant him sudo privileges for bundle binary I guess
but that seems so unnecessary).

Is there a method of invoking / using 'bundle install' that is simply
satisfied of all of the gems in the base ruby installation (assuming
that they're there of course) without needing sudo privileges?

Craig

Craig White wrote in post #1021199:

Having a problem...

I am working on a project where I am using bundle & Gemfile and it's
working OK. The gems are all installed and a few git based gems are in
my ~/.bundler/ruby/1.8 directory which is OK I guess.

When I did an svn commit and checked it out on another user's account, I
then ran 'bundle install' from his account and even though all of the
regular gems were already installed and accessible, the bundle command
asked for his password for each gem (trying to escalate privileges) and
I finally gave the user sudo privileges out of frustration. That clearly
is not a good working methodology... I don't want him to have sudo
privileges (I could grant him sudo privileges for bundle binary I guess
but that seems so unnecessary).

Is there a method of invoking / using 'bundle install' that is simply
satisfied of all of the gems in the base ruby installation (assuming
that they're there of course) without needing sudo privileges?

This is not a Rails question. It's an OS question. You don't even
mention which OS. As long as the user account has write privileges to
wherever the gems are stored then sudo should not be necessary.

Have you looked into RVM? It's a great way to setup a Ruby environment
that installs everything inside the user's home directory so privileges
should no longer be an issue.

http://beginrescueend.com

Craig White wrote in post #1021199:
> Having a problem...
>
> I am working on a project where I am using bundle & Gemfile and it's
> working OK. The gems are all installed and a few git based gems are in
> my ~/.bundler/ruby/1.8 directory which is OK I guess.
>
> When I did an svn commit and checked it out on another user's account, I
> then ran 'bundle install' from his account and even though all of the
> regular gems were already installed and accessible, the bundle command
> asked for his password for each gem (trying to escalate privileges) and
> I finally gave the user sudo privileges out of frustration. That clearly
> is not a good working methodology... I don't want him to have sudo
> privileges (I could grant him sudo privileges for bundle binary I guess
> but that seems so unnecessary).
>
> Is there a method of invoking / using 'bundle install' that is simply
> satisfied of all of the gems in the base ruby installation (assuming
> that they're there of course) without needing sudo privileges?

This is not a Rails question. It's an OS question. You don't even
mention which OS. As long as the user account has write privileges to
wherever the gems are stored then sudo should not be necessary.

Have you looked into RVM? It's a great way to setup a Ruby environment
that installs everything inside the user's home directory so privileges
should no longer be an issue.

http://beginrescueend.com

Dear Craig!

You definitely want to use RVM because this is the only way (as I
know) on any *nix system to avoid bad confusions with gem versions.
Also RVM can create separated Rubies, Gems further more project
specific Gemsets for you.

Please checkout this repo: http://gezope.github.com/rvm_install_script/
Or follow our post: http://rookieonrails.posterous.com/installing-ruby-on-rails-3-on-ubuntu
(half ready)

With RVM you never need to use sudo (actually it's bad to use).

If I were you I'd install RVM, Ruby, create a Gemset especially to
your project then would run "bundle install". Then all project memeber
can follow this idea and all local environments gonna be the same.

HTH, let me know if you've further questions.

ps. You can use SVN but Git is highly recommended.