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

  • Home
  • SEARCH
  • 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 831051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:08:34+00:00 2026-05-15T04:08:34+00:00

I’m trying to get some gems working on a web-host which supports ruby and

  • 0

I’m trying to get some gems working on a web-host which supports ruby and some ruby gems, but not some of the ones I need to use.

Following the instructions I found here, I kept the original gem location in my gem path, and added my own at /path/to/my/home/gems to ~/.gemrc

gemhome: /users/home/myuser/gems
gempath:
- /usr/local/lib/ruby/gems/1.8
- /users/home/mysuser/gems

I downloaded some gems manually and did installs using the –local and –install-dir options of the gem command. I then did a “gem list”, and can in fact see the gems I installed in my user directory, as well as the original gems in the normal system path.

If I kick on IRB or do a ruby -e, all the system gems work fine. However, I can’t get my user directory installed gems loaded:

$ ruby -r rubygems -e "require 'nokogiri'"
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__': no such file to load -- nokogiri (LoadError)
    from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
    from -e:1

I even tried the old school require_gem:

$ irb -r rubygems
irb(main):001:0> require_gem 'nokogiri'
Gem::LoadError: Could not find RubyGem nokogiri (> 0.0.0)

    from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:204:in `report_activate_error'
    from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:141:in `activate'
    from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:37:in `require_gem_with_options'
    from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:31:in `require_gem'
    from (irb):1

From my “gems list” I can see:

nokogiri (1.3.3)
Nokogiri is an HTML, XML, SAX, and Reader parser

I have this same problem with all the user-directory install gems. What am I missing here?

EDIT: This is not a rails app. This is for a command line-application. The program will be executed by my user account, just like the tests shown above in.

EDIT: Per Rafe’s suggestion, I looked at Gem.path from IRB. It only lists the system gem path, /usr/local/lib/ruby/gems/1.8, and not my user dir path as well.

  • 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-15T04:08:35+00:00Added an answer on May 15, 2026 at 4:08 am

    I had the same problem, I fixed it by adding the following at the top of the ruby file

    require 'rubygems'
    

    Hope that helps

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

Sidebar

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.