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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:10:25+00:00 2026-06-13T08:10:25+00:00

have a folder with proprietary classes(ex: propcode) with some classes in it(ex: propclass.rb), where

  • 0

have a folder with proprietary classes(ex: propcode) with some classes in it(ex: propclass.rb), where should I put that folder and how to require inside controllers?
The classes does not have modules and I can’t change them because would brake another applications.

Thank you, I’m new to ruby and have been trying and failing for almost an hour now.

  • 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-13T08:10:26+00:00Added an answer on June 13, 2026 at 8:10 am

    The best place to put files like this would be lib/propcode.
    If you are only going to use the code in your controller, then you should require it at the top of app/controllers/application_controller.rb with the following code:

    # Require propcode files
    Dir.glob(Rails.root.join('lib/propcode/**/*.rb')).each do |f|
      require f
    end
    

    Then you will be able to use these classes in your controller, and they won’t be loaded for Rake tasks or background jobs.

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

Sidebar

Related Questions

Like, we have folder /images/ , it has some files inside. And the script
I can't understand some strange thing. I have folder structure: application/ controllers/ forms/ models/
I have a folder /Tables that contain all the table objects scripts. Some of
I have a folder my_folder , and inside of that folder is a file
I have a folder with some dotfiles I would like to make symlinks for.
I have a folder which contains few files and some directories which I need
i have folder that contain image files which named with number 1,2,3... how do
I want to copy F:\test to folder F:\123 so that I have folder F:\123\test.
I have folder inside reource folder lets say resource->folder A->61.png so how to access
I have folder in my asp.net website ..namely admin i have following pages inside

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.