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 7403861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:10:14+00:00 2026-05-29T05:10:14+00:00

I remember I used gem install rails to install Rails, but today when I

  • 0

I remember I used gem install rails to install Rails, but today when I want to install another gem, by typing

gem install ruby-recaptcha

it fails, saying:

You don’t have write permissions into the …

Then I found my gem environment and sudo gem environment have different results:

For gem environment:

RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.15
  - RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-darwin11.0.1]
  - INSTALLATION DIRECTORY: /Users/hx/.rvm/gems/ruby-1.9.2-p290
  - RUBY EXECUTABLE: /Users/hx/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/hx/.rvm/gems/ruby-1.9.2-p290/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-11
  - GEM PATHS:
     - /Users/hx/.rvm/gems/ruby-1.9.2-p290
     - /Users/hx/.rvm/gems/ruby-1.9.2-p290@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - :gempath => ["/Users/hx/.rvm/gems/ruby-1.9.2-p290"]
     - :sources => ["http://rubygems.org/"]
  - REMOTE SOURCES:
     - http://rubygems.org/

For sudo gem environment:

  - RUBYGEMS VERSION: 1.8.15
  - RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-darwin11.0.1]
  - INSTALLATION DIRECTORY: /Users/hx/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1
  - RUBY EXECUTABLE: /Users/hx/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/hx/.rvm/rubies/ruby-1.9.2-p290/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-11
  - GEM PATHS:
     - /Users/hx/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1
     - /Users/hx/.gem/ruby/1.9.1
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - :gempath => ["/Users/hx/.rvm/gems/ruby-1.9.2-p290"]
     - :sources => ["http://rubygems.org/"]
  - REMOTE SOURCES:
     - http://rubygems.org/

Noticed that the installation directory is different. So when I use gem, I do not have permissions (I don’t know why I suddenly lose the permission). But when I use sudo gem, the gem is not installed into the right place. How can I fix this?

  • 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-29T05:10:15+00:00Added an answer on May 29, 2026 at 5:10 am

    RVM uses environment variables to configure rubygems – the gem command, basically if you have user installation (~/.rvm) you should not need to use to call any commands with sudo, especially gem – that if worked would install rail as root user in your home directory, making it impossible for you to manage your files … if you have any good reasons to use sudo – use rvmsudo instead – but really you should not have that need, especially to install gems.

    If you want to have some commands available in your system (like gist) you can use rvm wrapper and link generated binary in /usr/bin

    to fix permissions in your home:

    sudo chown $USER: ~/.rvm
    sudo chmod u+rw ~/.rvm
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I remember years ago being able to download and install the forums software used
I remember having used such an event, but I can't remember the name. The
I am used to doing this in jQuery $('#RememberMe').attr('checked', true); but I can't remember
Okay, I haven't used Interface Builder since Xcode 3.x but I remember there being
I remember I used to write in a .bat call myprog.exe But dos says
I want to ask about the different techniques they used to remember various programming
I remember seeing somewhere there ^ operator is used as a pointer operator in
I used to have a great Firefox add-on for this and I can't remember
As far as I remember, Visual Studio (both 2008 and 2010) used to have
I remember when I used to develop website in Japan - where there are

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.