Forum: Ruby on Rails Getting Started with Site Redesign and RoR

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B195d36cbb47ff2b67a80e3b8c43e727?d=identicon&s=25 John Smith (ohnnyj)
on 2006-02-01 20:00
Hello all:

I am in the process of redesigning my site and was thinking about
incorporating RoR into the overall structure.  However, there are
multiple things I would like to create with Rails, namely a gallery, a
weblog, and portfolio management system.  Given that I am going to be
using a lot of RoR, what is the best way to accomplish this task?  Here
are some random things that have come up and I am hoping some of you
guys/gals can help:

1. Should I create a separate web app for each of the aforementioned
items?  Then I would have separate directories for each with their own
public folders, stylesheets, etc.

2. Should I lump everything into one master CMS system and have that be
my main app and then create controllers for each of the other items?

3. I am having trouble getting my head around the whole folder structure
thing.  Let's say I have my website on my local computer for testing at:

../apache/htdocs/mysite/public/

Then I have everything that I want the public to see under that folder
(i.e. images, css, etc.).  However, I have my RoR apps at:

../apache/htdocs/mysite/apps/

I have tried using symbolic links to map from the apps/gallery/public
folder to /mysite/public/gallery/ and the page will display but it is
still trying to find the site assets under apps/gallery/public/.

Is there a way to have your app at one location and everything else
under another?

Ideally I would like my site to simply have urls such as:

mysite.com/gallery, mysite.com/journal, mysite.com/portfolio

I know this was long and I probably didn't explain myself very well.  If
further clarification is needed please let me know.

Thanks,

John
82476266af9d460415d8f1fc16bb54ed?d=identicon&s=25 Jarkko Laine (jarkko)
on 2006-02-02 07:36
(Received via mailing list)
Hi John,

On 1.2.2006, at 21.00, John Smith wrote:
>
> Ideally I would like my site to simply have urls such as:
>
> mysite.com/gallery, mysite.com/journal, mysite.com/portfolio

Don't get hung up on urls, it's just a matter of routing [1] when you
build your app. Basically, you put everything static under yourapp/
public and all the dynamic stuff can be configured how you want to.

I would in your case just create one application and split it in
modules/controllers for your different tasks.

//jarkko

[1] http://manuals.rubyonrails.com/read/chapter/65

--
Jarkko Laine
http://jlaine.net
http://odesign.fi
33bb150cf13d87bce4e80569ca317647?d=identicon&s=25 Siva Jagadeesan (Guest)
on 2006-02-02 18:25
(Received via mailing list)
Put ur controllers under packages

/app/controllers/journal

Then in ur ruote.rb , you will be map

/journal/* =>  Journal::CreateController

Something of that sort

Rgds,
--Siva Jagadeesan
http://www.varcasa.com/
My First Rails Project.
Education Through Collabration
This topic is locked and can not be replied to.