Forum: JRuby Problem with Warbler - ActionController::RoutingError "No route matches"

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.
Afcbc505100242cabd5f8eba7d7e793b?d=identicon&s=25 Christian Mueller (muellerc)
on 2008-10-07 23:56
(Received via mailing list)
I'm having an issue with with my rails app, running with warbler in
tomcat.
Here the details:
- OS: Windows XP (running in VMWare Fusion under mac os 10.4.11)
- Tomcat 6.0.16
- Java 1.6.0_5
- Rails 2.1.1
- Warbler 0.9.11

The warbler config is the default. The site was displayed correct (the
css
styles), but without the images. The images (and the css) are defined in
my
app/views/layout/application.html.erb as following:

<%= link_to(image_tag("flag_de.gif", :class => "flag", :width => "18",
:height => "12"), "#") %> | <%= link_to(image_tag("flag_uk.gif", :class
=>
"flag", :width => "18", :height => "12"), "#") %>




tomcat logs:

Processing SessionsController#login (for 127.0.0.1 at 2008-10-07
20:23:36)
[GET]
  Session ID: 607889c60cf850f8e406965d738cab85
  Parameters: {"controller"=>"sessions", "action"=>"login"}
Rendering template within layouts/application
Rendering sessions/login
Completed in 0.22399 (4 reqs/sec) | Rendering: 0.08093 (36%) | DB:
0.00940
(4%) | 200 OK [http://localhost/myapp/login]

07.10.2008 20:23:36 org.apache.catalina.core.ApplicationContext log
INFO:

Processing ApplicationController#index (for 127.0.0.1 at 2008-10-07
20:23:36) [GET]
  Session ID: 478a548f3ff7898566e7f8086fba98b5
  Parameters: {}


ActionController::RoutingError (No route matches "/images/flag_uk.gif."
with
{:method=>:get}):

/gems/gems/actionpack-2.1.1/lib/action_controller/routing/recognition_optimisation.rb:67:in
`recognize_path'

/gems/gems/actionpack-2.1.1/lib/action_controller/routing/route_set.rb:384:in
`recognize'
    /gems/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:148:in
`handle_request'
    /gems/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:107:in
`dispatch'
    /gems/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:104:in
`dispatch'
    /gems/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:120:in
`dispatch_cgi'
    /gems/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:35:in
`dispatch'
    file://lib/jruby-rack-0.9.2.jar!/rack/adapter/rails.rb:37:in
`serve_rails'
    file://lib/jruby-rack-0.9.2.jar!/rack/adapter/rails.rb:44:in `call'
    file://lib/jruby-rack-0.9.2.jar!/jruby/rack/rails.rb:145:in `call'
    file://lib/jruby-rack-0.9.2.jar!/rack/handler/servlet.rb:17:in
`call'
    :1

Rendering
C:/Programme/Tomcat/webapps/carrierDB2.0/WEB-INF/gems/gems/actionpack-2.1.1/lib/action_controller/templates/rescues/layout.erb
(not_found)

07.10.2008 20:23:37 org.apache.catalina.core.ApplicationContext log
INFO:

Processing ApplicationController#index (for 127.0.0.1 at 2008-10-07
20:23:37) [GET]
  Session ID: ed357aee21be4d908376076640f60370
  Parameters: {}


ActionController::RoutingError (No route matches "/images/flag_de.gif."
with
{:method=>:get}):

/gems/gems/actionpack-2.1.1/lib/action_controller/routing/recognition_optimisation.rb:67:in
`recognize_path'

/gems/gems/actionpack-2.1.1/lib/action_controller/routing/route_set.rb:384:in
`recognize'
    /gems/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:148:in
`handle_request'
    /gems/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:107:in
`dispatch'
    /gems/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:104:in
`dispatch'
    /gems/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:120:in
`dispatch_cgi'
    /gems/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:35:in
`dispatch'
    file://lib/jruby-rack-0.9.2.jar!/rack/adapter/rails.rb:37:in
`serve_rails'
    file://lib/jruby-rack-0.9.2.jar!/rack/adapter/rails.rb:44:in `call'
    file://lib/jruby-rack-0.9.2.jar!/jruby/rack/rails.rb:145:in `call'
    file://lib/jruby-rack-0.9.2.jar!/rack/handler/servlet.rb:17:in
`call'
    :1

Rendering
C:/Programme/Tomcat/webapps/carrierDB2.0/WEB-INF/gems/gems/actionpack-2.1.1/lib/action_controller/templates/rescues/layout.erb
(not_found)



Do you have any idea, what was wrong?

Thx,
Christian
--
View this message in context:
http://www.nabble.com/Problem-with-Warbler---Actio...
Sent from the JRuby - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
3a4ecaf99c9189e75bff01d8334ca370?d=identicon&s=25 Jay McGaffigan (Guest)
on 2008-10-08 02:54
(Received via mailing list)
We've seen this problem.

Not sure exactly what the problem is but a work around is to do the
following:

In your actionpack gem you can change line 477 of the
asset_tag_helper.rb
file to the following:

source += ".#{ext}" if (ext && File.extname(source).blank?) || (ext &&
File.exist?(File.join(ASSET_DIR, dir, "#{source}.#{ext}")))


on windows there seems to be an issue with how the order of operations
is
working

Jay
Afcbc505100242cabd5f8eba7d7e793b?d=identicon&s=25 Christian Mueller (muellerc)
on 2008-10-08 15:04
(Received via mailing list)
Hi Jay!

Thank you for your quick answer. This solution works for me (with a
little
change - the constant is ASSETS_DIR instead of ASSET_DIR)... :-)

You wrote "We've seen this problem.". Do you know, whether a bug report
exists (may be as an improvement)?

Christian



Jay McGaffigan wrote:
> File.exist?(File.join(ASSET_DIR, dir, "#{source}.#{ext}")))
> To: user@jruby.codehaus.org
> - Java 1.6.0_5
> "flag", :width => "18", :height => "12"), "#") %>
> Rendering template within layouts/application
>   Parameters: {}
> /gems/gems/actionpack-2.1.1/lib/action_controller/routing/route_set.rb:384:i
>     /gems/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:35:in
> lib/action_controller/templates/rescues/layout.erb
>
> `recognize'
>     file://lib/jruby-rack-0.9.2.jar!/rack/adapter/rails.rb:37:in
>
> Sent from the JRuby - User mailing list archive at Nabble.com.
> Version: 8.0.173 / Virus Database: 270.7.5/1702 - Release Date: 10/6/2008
>
--
View this message in context:
http://www.nabble.com/Problem-with-Warbler---Actio...
Sent from the JRuby - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
3a4ecaf99c9189e75bff01d8334ca370?d=identicon&s=25 Jay McGaffigan (Guest)
on 2008-10-08 22:52
(Received via mailing list)
Sorry for the typo.

Here are some links to some information about it:
http://rails.lighthouseapp.com/projects/8994/ticke...
-expression-bug-in-compute_public_path


http://rails.lighthouseapp.com/projects/8994/ticke...
g


From reading the first link it looks like Rails was patched on the edge
just
the other day.

Jay
This topic is locked and can not be replied to.