How does WEBrick load Gems requested at runtime?

I am trying to use a Gem in my application.

I have verified that I am “requiring” it correctly in my controller.

When I go to access a name in the Gem, I get an “uninitialized constant”

However, if I wait a few minutes, it seems like the symbol then becomes

Is there some kind of polling going on here in WEBrick where it’s
attempting to discover Gems?

Here are a couple of scenarios:

  1. I’m not changing any code and restarting my WEBrick server and I
    can’t see the symbol anymore.

So, basically, can anyone elucidate the relationship between WEBrick and

Do I need to use the --rubygems option when I do

“ruby script/server”


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs