Hi All, I am currently developing against webrick and as such my application appears under http://localhost:3000/ but in my continuous integration environment (jruby war deployed to tomcat) the application appears under http://localhost:8080/myapp This is a pain when writing Selenium tests because in development I can use commands such as.. open /foo .. but the ci needs to use .. open /myapp/foo Note that I think this is a deficiency in the SeleneseAntTask which accepts a startURL, but ... "Note that only the hostname part of this URL will really be used." So... instead I''m wanting a "quick" solution by setting an application context on webrick. I thought this was possible just by using ... server.mount( ''/myapp'', ... ) .. but when I do this Rails gives me a routing error.. eg, No route matches "/myapp/foo" with {:method=>:get} So, I''m assuming I''m missing something in my webrick config in order to mount myapp? .. or do I need to add something to routes.rb? ps. I originally posted this to http://lists.rubyonrails.org/mailman/listinfo/rails but had no reply from anyone.. even after mailing rails-owner-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org to find out what was going on ... so is that list defunct? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
So, no one can help me with this? .. have I posted to the wrong forum? .. should I have posted to Rails Deployment? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
What do you need help with? No, sure! On Fri, Sep 19, 2008 at 9:17 AM, Sam Ramsden < rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > So, no one can help me with this? .. have I posted to the wrong forum? > .. should I have posted to Rails Deployment? > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
How do I deploy an application to webrick that can then be found under a specified application context such as localhost:3000/myapp rather than the default localhost:3000 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sep 18, 9:36 pm, Sam Ramsden <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> How do I deploy an application to webrick that can then be found under a > specified application context such as localhost:3000/myapp rather than > the default localhost:3000Add it into config/routes.rb: map.connect ''myapp/:controller/:action/:id'' map.connect ''myapp/:controller/:action/:id.:format'' For mapped resources, use the namespace. Here''s the example in my routes.rb: # Sample resource route within a namespace: # map.namespace :admin do |admin| # # Directs /admin/products/* to Admin::ProductsController (app/ controllers/admin/products_controller.rb) # admin.resources :products # end This probably isn''t the "right" way. Another option would be to use apache to proxy the requests, either proxying and reverse proxying / myapp to / to webbrick, or proxying and reverse proxying / to /myapp for tomcat. Kevin --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks Kevin, that indeed works on webrick but it does kill the tomcat version. No matther though because it can be reconfigured based on environment. So ... Thanks! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---