[katello-devel] katello install discovering rails engines
Tom McKay
thomasmckay at redhat.com
Thu Apr 11 15:25:47 UTC 2013
----- Original Message -----
> From: "Ohad Levy" <ohadlevy at redhat.com>
> To: "Tom McKay" <thomasmckay at redhat.com>
> Cc: "katello-devel" <katello-devel at redhat.com>
> Sent: Thursday, April 11, 2013 11:15:42 AM
> Subject: Re: [katello-devel] katello install discovering rails engines
>
>
>
> ----- Original Message -----
> |
> |
> | ----- Original Message -----
> | > From: "Ohad Levy" <ohadlevy at redhat.com>
> | > To: "Tom McKay" <thomasmckay at redhat.com>
> | > Cc: "Ivan Necas" <inecas at redhat.com>, "katello-devel"
> | > <katello-devel at redhat.com>
> | > Sent: Thursday, April 11, 2013 3:38:14 AM
> | > Subject: Re: [katello-devel] katello install discovering rails engines
> | >
> | >
> | >
> | > ----- Original Message -----
> | > | Ivan,
> | > |
> | > | Have you done anything in foreman along the lines of loading additional
> | > | rails
> | > | engines after rpm-install of foreman?
> | > |
> | > | What I wrote today [1] is to have katello perform two additional steps
> | > | at
> | > | startup:
> | > | 1) Load Engines.in, a file equivalent to Gemfile.in, where engine gems
> | > | would
> | > | be listed for loading by bundler_ext
> | > | 2) Load engine_routes.rb from routes.rb to mount the engines (eg. mount
> | > | SomeEngine::Engine => '/mypath')
> | >
> | > IMHO you should not use mountable engines within katello and foreman.
> | > mountable engines mean that its a rails engine that can be used within
> | > different rails app, I dont think this is the target case here.
> | >
> | > instead, you should use full engines, that simply extend the app.
> | >
> | > you can find an example of an engine that i played with at [1]
> | >
> | > Ohad
> | >
> |
> |
> | I made a --full rails engine with a single route: /spoon/welcome
> |
> | In a katello install:
> | 1. bundler.d/spoon.rb = gem 'spoon'
> | 2. config/application/rb added require 'spoon'
> |
> | The route https://mysys/spoon/welcome is not accessible. I assume this is
> | because apache is not passing /spoon to /katello. How would I map an
> | engines
> | routes to be _under_ /katello (ie. /katello/spoon/welcome)? Or would I
> | require the engine installer to update apache too (not my preference)?
> |
>
> the engine routes should be avail under katello/spoon, there is nothing that
> would allow it to be under /spoon as thats taken care by apache.
>
> Ohad
> |
> | _______________________________________________
> | katello-devel mailing list
> | katello-devel at redhat.com
> | https://www.redhat.com/mailman/listinfo/katello-devel
> |
>
Perfect! After removing the last line in routes.rb
match '*a', :to => 'errors#routing'
and telling my spoon controller not to authorize, I get to the welcome page.
Thanks!
More information about the katello-devel
mailing list