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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:00:56+00:00 2026-06-11T07:00:56+00:00

why my engine can’t be loaded? When I startup server console show message: `load_missing_constant’:

  • 0

why my engine can’t be loaded?

When I startup server console show message:

`load_missing_constant': Expected D:/alexandre/dev/rails/project_name/lib/admin/engine.rb to define Admin::Engine (LoadError)

But “/lib/admin/engine.rb” exists and its contents is:

Admin::Engine.routes.draw do
    get '/' => "admin#index"
    get '/error' => "admin#error"

    post '/thunder' => "thunder#create", :as => "thunders"

    get '/:class' => "admin_models#index"
    get '/:class/new' => "admin_models#new"
    post '/:class' => "admin_models#create"
    get '/:class/:id' => "admin_models#show"
    get '/:class/:id/edit' => "admin_models#edit"
    put '/:class/:id' => "admin_models#update"
    delete '/:class/:id' => "admin_models#destroy"
end

In routes I add this line:

mount Admin::Engine => '/admin', :as => 'admin'

Project specification:

  • ruby 1.9.2p180
  • Rails 3.2.6
  • 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-11T07:00:57+00:00Added an answer on June 11, 2026 at 7:00 am

    The file “/lib/admin/engine.rb”, should define the constant Admin::Engine, or more explicitely that file should define the class Admin::Engine. Here is a minimal example of the content for that file

    module Admin
      class Engine < ::Rails::Engine
        #isolate_namespace Admin #see http://api.rubyonrails.org/classes/Rails/Engine.html#label-Isolated+Engine
      end
    end
    

    The snipped you posted before is about the routes of your engine and should therefore be placed in “config/routes.rb”

    The documentation and the guide are great ways to get familiar with engines. If you like books, I advise you to read Crafting Rails Applications which is a small but very dense book and talks extensively about engines (and is written by one of the most awesome rubyist : Jose Valim).

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

Sidebar

Related Questions

The server part of the Remote API that App Engine uses can be installed
I made a game engine that I can use on the server side as
In google app engine can I have www.domain.com point to version X of my
I would like to know if Google App Engine can be used as a
Possible Duplicate: Escape @ character in razor view engine how can i use '@'
Is there an API that my Google App Engine app can call when signed
Is there any open source engine project which can classify online text or article.
How can I develop 'Search Engine Friendly' web app in GWT? Take an example
Can anyone recommend a good Java game engine for developing simple tile-based games? I'm
can curl be used on google app engine ?

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.