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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:04:39+00:00 2026-06-10T18:04:39+00:00

I created ruby class and put it in app_dir/lib/appointment_messaging_job.rb class AppointmentMessagingJob def perform end

  • 0

I created ruby class and put it in app_dir/lib/appointment_messaging_job.rb

class AppointmentMessagingJob
  def perform
  end
end

In one of my controllers I do this:

test = AppointmentMessagingJob.new

I get a very annoying very incomprehensible error:

Started GET "/en/appointments/1/approve" for 127.0.0.1 at 2012-09-04 13:02:43 -0400
Processing by AppointmentsController#approve as HTML
  Parameters: {"locale"=>"en", "id"=>"1"}
Completed 500 Internal Server Error in 2ms

NameError (uninitialized constant AppointmentsController::AppointmentMessagingJob):
  app/controllers/appointments_controller.rb:89:in 'approve'

What is this uninitialized constant? I really don’t get it.

  • 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-10T18:04:41+00:00Added an answer on June 10, 2026 at 6:04 pm

    Your library isn’t being loaded and it’s failing to resolve the class name.

    Update your config/application.rb to automatically include the lib directory; there is a line in there that is commented out by default:

    # Custom directories with classes and modules you want to be autoloadable.
    # config.autoload_paths += %W(#{config.root}/extras)
    

    (You’d want to include the lib directory, not extras, obviously.)

    IIRC you could also use require 'test_class' in your controller, the lib directory is on the library path. This makes the dependency more explicit, but I’m not sure it’s that much more communicative.

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

Sidebar

Related Questions

So I create a class in ruby: class User def initialize end end Now
So, I wrote a simple Ruby class, and put it in my rails /lib
I am testing this controller: class SessionsController < ApplicationController def new end def create
I have created one ruby script that I want to run with some flags
I'm having this table class CreateEvents < ActiveRecord::Migration def self.up create_table :events do |t|
I'm having a little problem with this Ruby code: class Tap attr_accessor :c, :v,
I created a singly LinkedList class with ruby. Everything went well till trying to
I'm wondering if one could define a class in Ruby to have the following
I am currently creating a Dashboard app which is created with Ruby on Rails.
I'd created my first web app using Ruby on Rails. And now, I want

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.