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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:01:06+00:00 2026-06-03T23:01:06+00:00

I created a new gem: https://github.com/tntwebsolutions/ts3query In my init.rb file I require the main

  • 0

I created a new gem: https://github.com/tntwebsolutions/ts3query

In my init.rb file I require the main lib file, this should autoload the gem when the rails application is loaded. But when I start the server it seams that the init.rb file gets not loaded.

In my application I have this in my Gemfile:

gem "ts3query", "~> 0.2.1"

And do this in my application_controller.rb:

@query = TS3Query.connect :password => password

But then I get this error:

uninitialized constant ApplicationController::TS3Query

If I do this:

require 'TS3Query'
@query = TS3Query.connect :password => password

It does works. But I can’t figure out, what I have to change at my gem to load the require 'TS3Query' when the rails application is loaded.

  • 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-03T23:01:08+00:00Added an answer on June 3, 2026 at 11:01 pm

    init.rb is not called anywhere for anyone, rename your file from TS3Query.rb to ts3query.rb and bundler will load it automatically for you.

    Avoid using names with upper and lower case charaters, Linux and some Macs have case-sensitive file systems and while it works for someone might not work for everyone else.

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

Sidebar

Related Questions

I have installed the Enki (blogging) gem https://github.com/xaviershay/enki together with the Forem (forums) gem
I'm using the Rails 3 Vestal Versions gem: https://github.com/lailsonbm/vestal_versions I'd like to create some
Jnunemaker just updated his twitter gem (https://github.com/jnunemaker/twitter) and removed the Twitter::Oauth class. My code
I followed the instructions for the gem perfectly - https://github.com/jaustinhughey/vanities - and everything else
I am running Jruby 1.6.7 in ruby 1.8 I can install the gem: https://github.com/consti/tupalo-kdtree
Sorcery authentication gem: https://github.com/NoamB/sorcery Sorcery's creator provides an example Rails app with Sorcery test
I have created a gem that adds a new method to the class ActiveRecord::Base.
I created a new HalloWorld Makefile Project. There is a HalloWorld.cpp with my main
I created a new ASP.NET MVC application. The home page looks like this: I
I created a new View (LogView) in Infrastructure.Module project. This view will be used

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.