Routing error

0 views
Skip to first unread message

Bharat

unread,
Nov 5, 2008, 3:25:43 PM11/5/08
to Insoshi
Just installed Insoshi. Things seem to have gone OK, but not
entirely. When I start the app and type in:
http://localhost:3000
I get the following exception in the log:

Processing ApplicationController#index (for 127.0.0.1 at 2008-11-05
15:18:58) [GET] (pid:14719)
Session ID:
BAh7BzoOcGVyc29uX2lkaQoiCmZsYXNoSUM6J0FjdGlvbkNvbnRyb2xsZXI6
OkZsYXNoOjpGbGFzaEhhc2h7AAY6CkB1c2VkewA=--1443301b39802a028a61de10443e796413b445e6
(pid:14719)
Parameters: {} (pid:14719)


ActionController::RoutingError (No route matches "/thumbnails/
0000/0007/male_main_thumbnail.jpg" with {:method=>:get}):
/vendor/rails/actionpack/lib/action_controller/routing/
recognition_optimisation.rb:67:in `recognize_path'
/vendor/rails/actionpack/lib/action_controller/routing/
route_set.rb:384:in `recognize'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
148:in `handle_request'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
107:in `dispatch'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
104:in `synchronize'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
104:in `dispatch'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
120:in `dispatch_cgi'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:35:in
`dispatch'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
rails.rb:76:in `process'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
rails.rb:74:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
rails.rb:74:in `process'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
159:in `process_client'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
158:in `each'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
158:in `process_client'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
285:in `run'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
285:in `initialize'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
285:in `new'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
285:in `run'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
268:in `initialize'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
268:in `new'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
268:in `run'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/
configurator.rb:282:in `run'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/
configurator.rb:281:in `each'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/
configurator.rb:281:in `run'

The app works from that point onwards though. Apparently, the path to
the thumbnails is not being resolved correctly. Can anyone help?

Thanks.

Bharat

Bharat

unread,
Nov 6, 2008, 11:10:00 PM11/6/08
to Insoshi
I have managed to get around the problem by installing ImageMagick and
RMagick instead of FreeImage and ImageScience. I am not sure what is
wrong with my installation of FreeImage and ImageScience. Did anyone
else have this experience? The thumbnail resizing did not work at all
in FreeImage and ImageScience.
Bharat

Long Nguyen

unread,
Nov 7, 2008, 12:29:25 AM11/7/08
to ins...@googlegroups.com
Can you go back into your logs and see if you have any errors the first time you tried to load in the images? (This would be during the "rake db:sample_data:load")

It can be hard to tell exactly what's going on since the image_science gem works through ruby_inline which compiles some C code to call FreeImage functions.  Sometimes you get an obvious horrible error but other times you might get a silent failure.

RMagick/ImageMagick doesn't have to jump through as many runtime hoops as image_science/FreeImage.  But the hard part can be getting ImageMagick installed if you're building it from source if you don't want to/can't use a pre-built binary package.

Long
--
Long Nguyen
long....@insoshi.com

Bharat

unread,
Nov 8, 2008, 10:03:12 AM11/8/08
to Insoshi
Hello Long,
Appreciate the response. I tried going that route already.
Unfortunately, it is the silent failure that I get and had a very
difficult time debugging it. So I went to a smaller project; Mike
Clark's attachment_fu recipe in the Advanced Rails and spent a lot of
time going through it. Finally figured out that it is not an
attachment_fu problem either. I tried rebuilding FreeImage according
to instructions given here:

http://seattlerb.rubyforge.org/ImageScience.html

but no luck. So I went back to ImageMagick/RMagick which I had worked
through on LovdByLess installation. May be ImageMagick is a better
option? I have been looking at PaperClip which seems better and more
intuitive than attachment_fu? Thing is: attachment_fu does not give
you any error messages either that it failed to create the thumbnails
so in that regard it is no better than FreeImage/Image_Science?
Paperclip only depends on ImageMagick. Food for thought.
Regards,
Bharat
Reply all
Reply to author
Forward
0 new messages