Wondering if this is possible in an elegant global way to adjust RoR''s urls... Basically what I would like to do is make Rails aware that it needs to have to adjust all the urls that refer to itself by a preceeding "/ rails" in the urls. I''ve tried things in routes.rb such as "map.test ''rails/:controller, :action''", etc.., but to no avail. Currently the only way I''ve been able to do this is to more or less hard code it ( which may not be too bad of a thing in this case ) in any .rhtml files with a link_to adjustment, as in <%= link_to "newBYE", :controller => "/rails/hello", :action => "list_times" %> Not knowing RoR well enough yet to know if this is going to be a problem.. but it seems to me a routes.rb generating solution would be better. I wouldn''t think this would be that hard, but perhaps it''s to much away from "convention over configuration". The reason I want to do this is because at first we''ll be using Apache to proxy Rails requests, and the ''/rails'' is the flag for Apache to hit on the reverse proxy. Thanks for any information, -Dave --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
jetskers wrote:> > Wondering if this is possible in an elegant global way to adjust RoR''s > urls... > > Basically what I would like to do is make Rails aware that it needs to > have to adjust all the urls that refer to itself by a preceeding "/ > rails" in the urls. I''ve tried things in routes.rb such as "map.test > ''rails/:controller, :action''", etc.., but to no avail. Currently the > only way I''ve been able to do this is to more or less hard code it > ( which may not be too bad of a thing in this case ) in any .rhtml > files with a link_to adjustment, as in > <%= link_to "newBYE", :controller => "/rails/hello", :action => > "list_times" %> > > Not knowing RoR well enough yet to know if this is going to be a > problem.. but it seems to me a routes.rb generating solution would be > better. I wouldn''t think this would be that hard, but perhaps it''s > to much away from "convention over configuration". > > The reason I want to do this is because at first we''ll be using Apache > to proxy Rails requests, and the ''/rails'' is the flag for Apache to > hit on the reverse proxy. > > Thanks for any information, > > -DaveSince you''ll be using Apache you can have it do the work for you by doing something like: ProxyPass /rails http://127.0.0.1:3000/ ProxyPassReverse /rails http://127.0.0.1:3000/ -- Michael Wang --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Well, yes, of course, and that''s what I''m doing. But how do I tell applications in rails to write links that refer to applications written in rails to put in /rails in those url''s? On Mar 26, 2:31 pm, Michael Wang <rails-u...-JtyympAsP2K7zZZRDBGcUA@public.gmane.org> wrote:> jetskers wrote: > > > Wondering if this is possible in an elegant global way to adjust RoR''s > > urls... > > > Basically what I would like to do is make Rails aware that it needs to > > have to adjust all the urls that refer to itself by a preceeding "/ > > rails" in the urls. I''ve tried things in routes.rb such as "map.test > > ''rails/:controller, :action''", etc.., but to no avail. Currently the > > only way I''ve been able to do this is to more or less hard code it > > ( which may not be too bad of a thing in this case ) in any .rhtml > > files with a link_to adjustment, as in > > <%= link_to "newBYE", :controller => "/rails/hello", :action => > > "list_times" %> > > > Not knowing RoR well enough yet to know if this is going to be a > > problem.. but it seems to me a routes.rb generating solution would be > > better. I wouldn''t think this would be that hard, but perhaps it''s > > to much away from "convention over configuration". > > > The reason I want to do this is because at first we''ll be using Apache > > to proxy Rails requests, and the ''/rails'' is the flag for Apache to > > hit on the reverse proxy. > > > Thanks for any information, > > > -Dave > > Since you''ll be using Apache you can have it do the work for you by > doing something like: > > ProxyPass /railshttp://127.0.0.1:3000/ > ProxyPassReverse /railshttp://127.0.0.1:3000/ > > -- > Michael Wang--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
jetskers wrote:> Well, yes, of course, and that''s what I''m doing. > > But how do I tell applications in rails to write links that refer to > applications > written in rails to put in /rails in those url''s?If you are using Mongrel you can do it like this: mongrel_rails start -d -p 3000 \ -a 127.0.0.1 \ -e production \ --prefix /rails -- Michael Wang --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Well, yes, of course, and that''s what I''m doing. But how do I tell applications in rails to write links that refer to applications written in rails to put in /rails in those url''s? On Mar 26, 2:31 pm, Michael Wang <rails-u...-JtyympAsP2K7zZZRDBGcUA@public.gmane.org> wrote:> jetskers wrote: > > > Wondering if this is possible in an elegant global way to adjust RoR''s > > urls... > > > Basically what I would like to do is make Rails aware that it needs to > > have to adjust all the urls that refer to itself by a preceeding "/ > > rails" in the urls. I''ve tried things in routes.rb such as "map.test > > ''rails/:controller, :action''", etc.., but to no avail. Currently the > > only way I''ve been able to do this is to more or less hard code it > > ( which may not be too bad of a thing in this case ) in any .rhtml > > files with a link_to adjustment, as in > > <%= link_to "newBYE", :controller => "/rails/hello", :action => > > "list_times" %> > > > Not knowing RoR well enough yet to know if this is going to be a > > problem.. but it seems to me a routes.rb generating solution would be > > better. I wouldn''t think this would be that hard, but perhaps it''s > > to much away from "convention over configuration". > > > The reason I want to do this is because at first we''ll be using Apache > > to proxy Rails requests, and the ''/rails'' is the flag for Apache to > > hit on the reverse proxy. > > > Thanks for any information, > > > -Dave > > Since you''ll be using Apache you can have it do the work for you by > doing something like: > > ProxyPass /railshttp://127.0.0.1:3000/ > ProxyPassReverse /railshttp://127.0.0.1:3000/ > > -- > Michael Wang--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Well, yes, of course, and that''s what I''m doing. But how do I tell applications in rails to write links that refer to applications written in rails to put in /rails in those url''s? On Mar 26, 2:31 pm, Michael Wang <rails-u...-JtyympAsP2K7zZZRDBGcUA@public.gmane.org> wrote:> jetskers wrote: > > > Wondering if this is possible in an elegant global way to adjust RoR''s > > urls... > > > Basically what I would like to do is make Rails aware that it needs to > > have to adjust all the urls that refer to itself by a preceeding "/ > > rails" in the urls. I''ve tried things in routes.rb such as "map.test > > ''rails/:controller, :action''", etc.., but to no avail. Currently the > > only way I''ve been able to do this is to more or less hard code it > > ( which may not be too bad of a thing in this case ) in any .rhtml > > files with a link_to adjustment, as in > > <%= link_to "newBYE", :controller => "/rails/hello", :action => > > "list_times" %> > > > Not knowing RoR well enough yet to know if this is going to be a > > problem.. but it seems to me a routes.rb generating solution would be > > better. I wouldn''t think this would be that hard, but perhaps it''s > > to much away from "convention over configuration". > > > The reason I want to do this is because at first we''ll be using Apache > > to proxy Rails requests, and the ''/rails'' is the flag for Apache to > > hit on the reverse proxy. > > > Thanks for any information, > > > -Dave > > Since you''ll be using Apache you can have it do the work for you by > doing something like: > > ProxyPass /railshttp://127.0.0.1:3000/ > ProxyPassReverse /railshttp://127.0.0.1:3000/ > > -- > Michael Wang--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
oops... shouldn''t be hitting that reload button. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---