users@glassfish.java.net

Re: Glassfish problem with Rails routing!

From: Vivek Pandey <Vivek.Pandey_at_Sun.COM>
Date: Tue, 19 Jan 2010 06:39:24 -0800

It should have just worked. I suspect that the reason it might be a
problem due to context root glassfish uses for deployed app and latter
does the dispatching to appropriate grizzly adapter based on this
context root. By default its application name.

Can you deploy your app with root context '/'?

asadmin deploy --contextroot / your-app-dir/

-vivek.

glassfish_at_javadesktop.org wrote:
> We are getting a strange routing error that we have narrowed down to only occurring in Glassfish (v3). Basically we have a production application that we've started to make RESTful in it's routing. The concern is that we want to use Glassfish for subsequent deployments that are RESTful from the ground up, but are tentative now. This is where we are getting a problem.
>
> We have a controller called CorporationsController and the error comes up when invoking corporations_path (which should be a :controller => :corporations, :action => :index, :method => :get, correct?)
>
> We wind up with this error.
>
> ActionView::TemplateError (No route matches "/ecoenergyweb/corporations" with {})
>
> If we run things under the WebBrick server, we have absolutely no problem with this route (or any other RESTful route). I feel like some critical problem is at play, but a search of all sorts of notes online reveals nothing.
>
> We are running:
>
> Windows
> JRuby 1.4.0
> Glassfish 3
> Rails 2.3.5
>
> This is our routes.rb with the new RESTful routes up top:
>
> map.resources :provinces
> map.resources :corporations
> map.resources :weather_locations
> map.resources :type_of_houses
> map.resources :valid_softwares
> map.connect ':controller/:action/:id'
> map.connect ':controller/:action/:id.:format'
> map.connect '', :controller => 'evaluation', :action => 'index'
> [Message sent by forum member 'wischr' (cwise_at_murmurinformatics.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=381686
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>