Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 415255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:21:47+00:00 2026-05-12T18:21:47+00:00

If you don’t install gems with sudo on a mac, by default they will

  • 0

If you don’t install gems with sudo on a mac, by default they will be placed in a directory like

.gem/ruby/1.8/gems/

If you DO install by with sudo, my understanding is they are normally placed in the system directories, like so:

 /usr/local/lib/ruby/gems/1.8/gems/

Is there a good reason you should install gems with sudo instead, other than simply letting others share them with you? *

I’m under the impression that you’d sudo install gems because if you as user bob install the gems inside bob‘s directory, then a user like www-data (used by Passenger/Apache on Ubuntu Linux when serving files), to use them – is this the only reason you’d use them like this?

Or is best practice now to use something like Ruby Version Manager instead now?

I’d really appreciate hearing from some more experienced ruby developers about where you store yours and why.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T18:21:47+00:00Added an answer on May 12, 2026 at 6:21 pm

    Running gem install with sudo means you are running the install as an admin user and as such will install it for the whole system. If you run as a normal user it will just put the gems in your home directory.

    For your development machine or server, /usr/local/lib/ruby/gems/1.8/gems/ is almost certainly the right place to put gems. If you are on some kind of shared hosting or playing around with development versions of some gems, by all means, keep them in your home directory so you don’t clutter up the system for other users.

    I haven’t heard of Ruby Version Manager before. I’ll check it out.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 230k
  • Answers 231k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The docs for NSLock says that NSLock uses Posix threads.… May 13, 2026 at 2:06 am
  • Editorial Team
    Editorial Team added an answer No. As others noted in followups to his comment, no… May 13, 2026 at 2:06 am
  • Editorial Team
    Editorial Team added an answer Perhaps a GroupBox? <GroupBox> <GroupBox.Header> <Label>Hello</Label> </GroupBox.Header> <TextBlock Text="World!" />… May 13, 2026 at 2:06 am

Related Questions

Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
If you don't control the invocation of your code, but would like to know
If you don't know what the operation aborted error is, here's a Microsoft KB
If you don't provide an ID for your declared controls in ASPX files, I
If you don't want any context or an example of why I need this,

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.