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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:52:57+00:00 2026-06-03T13:52:57+00:00

I made a full engine and converted some plugins to work together with the

  • 0

I made a full engine and converted some plugins to work together with the engine ( I put them in lib/ ) and load them in an initializer engine.rb

This is the structure :

  • app
    • config
      • routes.rb
  • lib
    • plugin
      • config
        • routes.rb

In the routes in app/config/routes.rb I have :

Rails.application.routes.draw do
  match 'help', :to => 'help#index', :as => 'help'
  match 'login', :to => 'sessions#new', :as => 'login'
  match 'logout', :to => 'sessions#destroy', :as => 'logout'
  match 'loadtest', :to => 'loadtests#index', :as => 'loadtest'
end

In the second routes.rb file in ( lib/plugin/config/routes.rb ) I have this :

Rails.application.routes.draw do
   match '/mailchimp/callback', :to => 'mailchimp#callback', :as => 'mailchimp_unsubscribe'
end

In my engine.rb in config/initializers/ I put :

require "#{File.dirname(__FILE__)}/../../lib/plugin/config/routes"

Now when I run rake app:routes I get this as output :

    help  /help(.:format)     help#index
   login  /login(.:format)    sessions#new
  logout  /logout(.:format)   sessions#destroy
loadtest  /loadtest(.:format) loadtests#index

How can I add the routes from the plugin to the engine routes?

  • 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-03T13:52:58+00:00Added an answer on June 3, 2026 at 1:52 pm

    Edit config/application.rb and add this line:

    config.paths["config/routes"] << Rails.root.join('lib/plugin/config/routes.rb')
    

    It should works.

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

Sidebar

Related Questions

I made this regex: /\<+[a-zA-Z0-9\=\\s]+\>+.+\<\/+[a-zA-Z0-9]+\>/gi which matches a full html tag like: <p>this is
I made simple plugin and i would like to work this plugin only below
I have made few changes on this huge JSF page, which is full of
I have made a full application in JQM using cakePHP as the server side
I've made an application that makes full use of ajax, and what I need
Visual Studio 2008 (vb.net) I made simple anivirus but when I make Full scan
Made this nice little loop for hiding and showing div's, works as a charm
Made a custom obj called Item with some string fields and one float. .h
I made small program to divide large pictures and take part of them. When
Java isn't deleting a file. I made sure it has permissions (full control to

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.