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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:50:40+00:00 2026-06-04T05:50:40+00:00

I have a feeling this is a dumb one, but I’ve spent some time

  • 0

I have a feeling this is a dumb one, but I’ve spent some time trying to figure it out and googling it, and to no avail. I’m trying to use a Ruby Gem in a Controller. I have included it in my Gemfile, run bundle install, seen it show up in my gems list, restarted my local server. But somehow whenever I try to call the gem ( rails_rrdtool ) It just tells me

uninitialized constant RrdgraphsController::RRD
app/controllers/rrdgraphs_controller.rb:22:in `show'

The spot in my code where it wigs is when I’m calling

RRD.graph

It’s as though it doesn’t know where the heck the gem is… However, I can use require to import it successfully into an irb session. So I know that it works, it’s just not getting in there some how…

Bundler should be handling the inclusion of the gem I assume. Am I calling it in the wrong place?

  • 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-06-04T05:50:41+00:00Added an answer on June 4, 2026 at 5:50 am

    This looks like a namespacing issue. Your error says it is looking for the constant inside of the current class: RrdgraphsController::RRD when it should be looking for a class outside of the current context.

    Try prefixing the class name with a double colon to fully define the location of the class.

    ::RRD.graph #rest of your code
    

    There’s a good analogy of what this does in this other accepted answer. Basically it creates an absolute path so Ruby doesn’t have to guess.

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

Sidebar

Related Questions

I have a feeling this might involve some sort of advanced selectors, but I
I have that this is a dumb question feeling, but here goes ... Can
I have a feeling this is a stupid question but I can't find the
I have the feeling the answer to this question is no but I figured
I have a feeling I am completely borking this MySQL query but I'll ask
Keep going around circles, but I am still unclear about this. Have a feeling
I have a feeling this is something to do with the answer, but I'm
I have a feeling this is due to some sort of rendering optimization or
I have a feeling this is a repost but I can't seem to find
I have a feeling this is not an easy task but I need to

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.