# Radius integration with rails app

**URL:** <https://www.ruby-forum.com/t/radius-integration-with-rails-app/120000>\
**Category:** Radiant CMS\
**Created:** [November 12, 2007, 8:35pm UTC](https://www.ruby-forum.com/t/radius-integration-with-rails-app/120000 "2007-11-12T20:35:23Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kieran\_Johnson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/848f3c/32.png) [@Kieran\_Johnson](https://www.ruby-forum.com/u/Kieran_Johnson)\
**Post date:** [November 12, 2007, 8:35pm UTC](https://www.ruby-forum.com/t/radius-integration-with-rails-app/120000/1 "2007-11-12T20:35:23Z")

</div>

Hi,

I’ve been looking through the source of Radiant and I’m not quite  
sure which files I need to include in a rails app so I can just have  
the use of radius. I can see that I need to require radius in my  
environment.rb and include the files that contain the tags, but how  
do I send them to the views so I can render them?

Sorry if this is a newbie question but Google turned up zilch.

Cheers

Kieran

---

<div class="post-metadata">

**Author:** ![Kieran\_Johnson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/848f3c/32.png) [@Kieran\_Johnson](https://www.ruby-forum.com/u/Kieran_Johnson)\
**Post date:** [November 12, 2007, 9:08pm UTC](https://www.ruby-forum.com/t/radius-integration-with-rails-app/120000/2 "2007-11-12T21:08:38Z")

</div>

Kieran Johnson wrote:

> Hi,
> 
> I’ve been looking through the source of Radiant and I’m not quite  
> sure which files I need to include in a rails app so I can just have  
> the use of radius. I can see that I need to require radius in my  
> environment.rb and include the files that contain the tags, but how  
> do I send them to the views so I can render them?
> 
> Sorry if this is a newbie question but Google turned up zilch.
> 
> Cheers
> 
> Kieran

I also have a rails app that I would like it to be used with Radiant. I  
would like to use radiant only for static pages And/Or the layout. Sorry  
for the newbie question but if anyone has any idea or tutorial on how to  
do that , it will be appreciated.

Thanks

Maged

---

<div class="post-metadata">

**Author:** ![Kieran\_Johnson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/848f3c/32.png) [@Kieran\_Johnson](https://www.ruby-forum.com/u/Kieran_Johnson)\
**Post date:** [November 12, 2007, 9:32pm UTC](https://www.ruby-forum.com/t/radius-integration-with-rails-app/120000/3 "2007-11-12T21:32:53Z")

</div>

Depends on if you want to use just Radius, or the whole Radiant  
application. If you want to use just Radius, you can install the gem  
and require it like you would any other gem. Then you would define  
your own context and tags within it, set up the parser and go.

For the case of integrating Radiant with your Rails app, the easiest  
way is to build your app in a Radiant extension and use the  
“share\_layouts” extension to use the same layouts as your Radiant  
pages. If you want more detail with this, query me again.

Sean

---

<div class="post-metadata">

**Author:** ![Kieran\_Johnson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/848f3c/32.png) [@Kieran\_Johnson](https://www.ruby-forum.com/u/Kieran_Johnson)\
**Post date:** [November 12, 2007, 11:35pm UTC](https://www.ruby-forum.com/t/radius-integration-with-rails-app/120000/4 "2007-11-12T23:35:58Z")

</div>

Thanks, its just using Radius within a Rails app. So do I put all the  
tags within one context and parse that? Or can I separate them out a  
bit and parse each one?

Kieran

---

<div class="post-metadata">

**Author:** ![Kieran\_Johnson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/848f3c/32.png) [@Kieran\_Johnson](https://www.ruby-forum.com/u/Kieran_Johnson)\
**Post date:** [November 13, 2007, 2:23am UTC](https://www.ruby-forum.com/t/radius-integration-with-rails-app/120000/5 "2007-11-13T02:23:09Z")

</div>

Have a look at the Radiant::Taggable module, PageContext class and  
StandardTags module in the Radiant source to get an idea of one  
strategy. One way or another, the tag definitions end up on a subclass  
of Radius::Context. How they get there is up to you.

Sean

---

<div class="post-metadata">

**Author:** ![Kieran\_Johnson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/848f3c/32.png) [@Kieran\_Johnson](https://www.ruby-forum.com/u/Kieran_Johnson)\
**Post date:** [November 14, 2007, 4:09pm UTC](https://www.ruby-forum.com/t/radius-integration-with-rails-app/120000/6 "2007-11-14T16:09:17Z")

</div>

Maged,

If you can stand to run two separate applications, the easiest solution  
is to use the web server to route requests to Radiant depending on the  
domain or URL. You won’t get integration between, but it would be a  
quick temporary solution until you can find a way to integrate them  
better.

Sean

---

<div class="post-metadata">

**Author:** ![Kieran\_Johnson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/848f3c/32.png) [@Kieran\_Johnson](https://www.ruby-forum.com/u/Kieran_Johnson)\
**Post date:** [November 19, 2007, 10:32am UTC](https://www.ruby-forum.com/t/radius-integration-with-rails-app/120000/7 "2007-11-19T10:32:53Z")

</div>

Sean C. wrote:

> Depends on if you want to use just Radius, or the whole Radiant  
> application. If you want to use just Radius, you can install the gem  
> and require it like you would any other gem. Then you would define  
> your own context and tags within it, set up the parser and go.
> 
> For the case of integrating Radiant with your Rails app, the easiest  
> way is to build your app in a Radiant extension and use the  
> “share\_layouts” extension to use the same layouts as your Radiant  
> pages. If you want more detail with this, query me again.
> 
> Sean

Hi sean.  
For integrating Radiant in my application , i am using mini\_radiant  
plugin.  
But i am getting some routed issues with it.  
Can you please provide me with the details as how to build my own  
application in a Radiant extension.

Thanks  
Arpit

---

<div class="post-metadata">

**Author:** ![Kieran\_Johnson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/848f3c/32.png) [@Kieran\_Johnson](https://www.ruby-forum.com/u/Kieran_Johnson)\
**Post date:** [November 14, 2007, 3:57pm UTC](https://www.ruby-forum.com/t/radius-integration-with-rails-app/120000/8 "2007-11-14T15:57:05Z")

</div>

Sean C. wrote:

> Depends on if you want to use just Radius, or the whole Radiant  
> application. If you want to use just Radius, you can install the gem  
> and require it like you would any other gem. Then you would define  
> your own context and tags within it, set up the parser and go.
> 
> For the case of integrating Radiant with your Rails app, the easiest  
> way is to build your app in a Radiant extension and use the  
> “share\_layouts” extension to use the same layouts as your Radiant  
> pages. If you want more detail with this, query me again.
> 
> Sean

Sean,  
I’ve tried to use rails\_support\_extension and it worked for a while  
but didn’t work any more. Does the “Share\_layouts” extension is the same  
idea, developing rails applications inside of the extension. what if I  
already have an app in production already and just need to use Radiant  
for static content storage, is there is a way to do so?

Thanks  
Maged

---

<div class="post-metadata">

**Author:** ![Kieran\_Johnson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/848f3c/32.png) [@Kieran\_Johnson](https://www.ruby-forum.com/u/Kieran_Johnson)\
**Post date:** [November 23, 2007, 7:43am UTC](https://www.ruby-forum.com/t/radius-integration-with-rails-app/120000/9 "2007-11-23T07:43:05Z")

</div>

Maged M. wrote:

> Arpit J. wrote:
> 
> > Sean C. wrote:
> > 
> > > Depends on if you want to use just Radius, or the whole Radiant  
> > > application. If you want to use just Radius, you can install the gem  
> > > and require it like you would any other gem. Then you would define  
> > > your own context and tags within it, set up the parser and go.
> > > 
> > > For the case of integrating Radiant with your Rails app, the easiest  
> > > way is to build your app in a Radiant extension and use the  
> > > “share\_layouts” extension to use the same layouts as your Radiant  
> > > pages. If you want more detail with this, query me again.
> > > 
> > > Sean
> > 
> > Hi sean.  
> > For integrating Radiant in my application , i am using mini\_radiant  
> > plugin.  
> > But i am getting some routed issues with it.  
> > Can you please provide me with the details as how to build my own  
> > application in a Radiant extension.
> > 
> > Thanks  
> > Arpit
> 
> Hi Arpit,  
> I’m using radiant only as for my static content and layout,  
> there is an extension that is called rails support that I’m currently  
> using, it lets you create a rails application with radiant and use  
> radiant for your static cms and layout. You could find docs and an  
> example for that at  
> [Google Code Archive - Long-term storage for Google Code Project Hosting.](http://code.google.com/p/radiant-rails-support/)
> 
> Thanks  
> Maged

Hi Maged,

Thanks for the reply.  
I have seen it, it let’s you create a rails application in radiant  
extensions.  
But what i need to do is to integrate radiant CMS in my own application.  
Any further idea?

Thanks  
Arpit

---

<div class="post-metadata">

**Author:** ![Kieran\_Johnson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/848f3c/32.png) [@Kieran\_Johnson](https://www.ruby-forum.com/u/Kieran_Johnson)\
**Post date:** [November 22, 2007, 5:39pm UTC](https://www.ruby-forum.com/t/radius-integration-with-rails-app/120000/10 "2007-11-22T17:39:34Z")

</div>

Arpit J. wrote:

> Sean C. wrote:
> 
> > Depends on if you want to use just Radius, or the whole Radiant  
> > application. If you want to use just Radius, you can install the gem  
> > and require it like you would any other gem. Then you would define  
> > your own context and tags within it, set up the parser and go.
> > 
> > For the case of integrating Radiant with your Rails app, the easiest  
> > way is to build your app in a Radiant extension and use the  
> > “share\_layouts” extension to use the same layouts as your Radiant  
> > pages. If you want more detail with this, query me again.
> > 
> > Sean
> 
> Hi sean.  
> For integrating Radiant in my application , i am using mini\_radiant  
> plugin.  
> But i am getting some routed issues with it.  
> Can you please provide me with the details as how to build my own  
> application in a Radiant extension.
> 
> Thanks  
> Arpit

Hi Arpit,  
I’m using radiant only as for my static content and layout,  
there is an extension that is called rails support that I’m currently  
using, it lets you create a rails application with radiant and use  
radiant for your static cms and layout. You could find docs and an  
example for that at  
[http://code.google.com/p/radiant-rails-support/](http://code.google.com/p/radiant-rails-support/)

Thanks  
Maged
