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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:08:10+00:00 2026-05-28T06:08:10+00:00

Using Rails 3.2 and ruby 1.9.3p0 I am trying out the gem delayed_job. I

  • 0

Using Rails 3.2 and ruby 1.9.3p0

I am trying out the gem delayed_job. I have created a file lib/mailing_job.rb in which I have class MailingJob.

In a controller under app/controllers/requests_controller.rb I am calling

job = MailingJob.new(@request)

but this is returning the error

uninitialized constant RequestsController::MailingJob

I think it is because I need a proper way of referencing a class under a different folder structure.

Any idea how I can isntantiate class MailingJob from a different file (class) in a different folder?

  • 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-28T06:08:11+00:00Added an answer on May 28, 2026 at 6:08 am

    Rails 3 does not include the lib folder within the load path so your application does not know how to find the class.

    You can modify config/application.rb and add a line to instruct rails to also look in the lib folder like so

    config.autoload_paths += %W(#{config.root}/lib)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Rails 3.2.0.rc2 and ruby 1.9.3p0 In app/views/requests/_form.html.erb I have the following code for
using Ruby on Rails 2.3.2, since I already created Scaffold for Story, so instead
I am using ruby on rails with a MySQL backend. I have a table
I am using bootstrap-sass, formtastic-bootstrap, rails 3.2, and ruby 1.9.3p0 on a new project.
I have just started out learning rails and ruby, so please bear with me
I am using Ruby on Rails 3 and I am trying start using Rails
I'm using Rails 3 and ruby 1.9 I'm trying to create a customized URL
New to rails/ruby (using rails 3 and ruby 1.9.2), and am trying to get
I have an app using Rails 3.0.6 which I run on two machines. I
I have successfully created a database and performed my first migration using: class CreateUsers

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.