Ruby on Rails and sub-folding opportunities

Discussion in 'Ruby/Rails' started by TOYOU, Mar 12, 2007.

  1. TOYOU

    TOYOU New Member

    Being happy with the ease of use of your products, I have had a troublesome experience trying to make ruby work under sub-folder. Your Rails Step-by-step wiki is more-or-less good but I strongly advice you to add some info saying that which step is compulsory and why. Most of my time I spent returning back to find out that I should have placed dispatch.lsapi exactly under ..public/ folder.So much of tears... Now I will proceed to the main course.

    Easy Rails was nice idea, since noone likes rewrite-rules. They are ugly, you know ;). I tried using your example rules, but they are not 100% suitable. Please, tell me how to make RoR work under this scheme: -http://some.dmn/1levelFolder/RoR. If it is possible, of course... Myself, I made it to some.dmn/ror->conroller, which is not suffice to say - perfect. I know about basic rewrite you proposed, but I had to make a context rule for every method, as I did not want all the subfolders handled solely by dispatch.lsapi...

    Thanks for all your work, and if you have by chance to answer my question, please make another person happy. In this cruel world.

    P.S. I am using you pre-release 3.0 standard and it says smth about 14.000 days without registration. "Your free software update had expired 13584 days ago." - Good humor was always a wonderful habit.

    Last edited: Mar 12, 2007
  2. mistwang

    mistwang LiteSpeed Staff

    With the easy rails setup, just define a Rails context with URI "/1levelfolder/" pointing to the root directory of RoR application. Actually, just change the URI from "/" to "/1levelfoler/" for your current rails context.
  3. TOYOU

    TOYOU New Member

    Sorry, but you must have misunderstood me. I have already made /subFolders but they are interpreted by Rails only if I define context. I meant that this app vmail to be sure) redirects to different methods, going form /address to /admin and so on. What I ask is how can I fool Rails app to think that root is smth like Just by adding one context declaration or redirect rule? Though I guess smth could be done in routes.rb, is there smth better?

    If it is possible? Without digging into rails and changing method enterpretation. Really?

    I would appreciate if it simpler than my head thinks...
  4. mistwang

    mistwang LiteSpeed Staff

    I think need to use rewrite rule or using a redirect context.

Share This Page