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 -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sun, 2011-09-11 at 07:33 +0200, Robert Walker wrote:> 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---- thanks for the suggestion on rvm but it''s something that would be counterproductive for my purposes. Having another copy of all the gems means that our gem versions could diverge and also means that I will have to do this for our deployed application too. I am jointly developing on the same system that it will be deployed and the graphic artist surely has no need (nor do I want him) to be able to modify the installed gems. The only reason he should ever need to actually run ''bundle install'' command is to simply download the few git based almost gems into his local profile so they function since I am maintaining the ''Gemfile'' Apparently ''bundle install'' wants sudo privleges... PWD=/home/users/ryan/website-development ; USER=root ; COMMAND=/bin/mkdir -p /usr/local/lib/ruby/gems/1.8/cache PWD=/home/users/ryan/website-development ; USER=root ; COMMAND=/bin/mv /home/users/ryan/.bundler/tmp/803/cache/activesupport-3.0.9.gem /usr/local/lib/ruby/gems/1.8/cache/activesupport-3.0.9.gem Which is sort of absurd - I really don''t want to give user ''ryan'' sudo privileges for pretty much everything and that includes /bin/mkdir and /bin/mv ''bundle --help'' is extremely terse. There''s no need for user ''ryan'' to modify anything in the local gem store since I have already done it. I am trying to figure out a way to turn that feature off for his usage only. Thus it is a ''bundle'' question which may not exactly be a Rails question but is not an OS question. Craig -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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.>>>>>>>>>>>>>Zoltán Gerő GTalk, Skype, Twitter: gezope Github: https://github.com/gezope StackOverflow: http://stackoverflow.com/users/515614/gezope RookieOnRails: http://rookieonrails.posterous.com <<<<<<<<<<<<< On Sep 12, 2:37 pm, Craig White <craigwh...-BQ75lA0ptkhBDgjK7y7TUQ@public.gmane.org> wrote:> On Sun, 2011-09-11 at 07:33 +0200, Robert Walker wrote: > > 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 > > ---- > thanks for the suggestion on rvm but it''s something that would be > counterproductive for my purposes. Having another copy of all the gems > means that our gem versions could diverge and also means that I will > have to do this for our deployed application too. > > I am jointly developing on the same system that it will be deployed and > the graphic artist surely has no need (nor do I want him) to be able to > modify the installed gems. The only reason he should ever need to > actually run ''bundle install'' command is to simply download the few git > based almost gems into his local profile so they function since I am > maintaining the ''Gemfile'' > > Apparently ''bundle install'' wants sudo privleges... > > PWD=/home/users/ryan/website-development ; USER=root ; > COMMAND=/bin/mkdir -p /usr/local/lib/ruby/gems/1.8/cache > > PWD=/home/users/ryan/website-development ; USER=root ; > COMMAND=/bin/mv /home/users/ryan/.bundler/tmp/803/cache/activesupport-3.0.9.gem /usr/local/lib/ruby/gems/1.8/cache/activesupport-3.0.9.gem > > Which is sort of absurd - I really don''t want to give user ''ryan'' sudo > privileges for pretty much everything and that includes /bin/mkdir > and /bin/mv > > ''bundle --help'' is extremely terse. There''s no need for user ''ryan'' to > modify anything in the local gem store since I have already done it. I > am trying to figure out a way to turn that feature off for his usage > only. Thus it is a ''bundle'' question which may not exactly be a Rails > question but is not an OS question. > > Craig > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.