small medium large xlarge

Generic-user-small
06 Nov 2008, 23:55
Bharat Ruparel (148 posts)

I have been trying to run the UploadImages Recipe from Mike Clark’s Advanced Rails Recipes book. I have installed both ImageScience and FreeImage on my Ubuntu 7.10 box. When I run the program and try to upload an image, I get a strange error which appears as follows:

ActionController::RoutingError (No route matches “/images/blank-cover-small.png” with {:method=>:get}): /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/routing/recognition_optimisation.rb:67:in recognize_path' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/routing/route_set.rb:384:in recognize’ /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:148:in handle_request' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:107:in dispatch’ /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in synchronize' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in dispatch’ /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:120:in dispatch_cgi' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/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’ /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in run’ /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281 /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in load' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in load’ /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in new_constants_in' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in load’ /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/servers/mongrel.rb:64 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in require’ /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in new_constants_in’ /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in require' /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in gem_original_require’ /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require’ script/server:3

Note that I am really trying to get Insoshi up and running and I get exactly the same error so I am pretty sure that the problem is in my installation of ImageScience and FreeImage but I do not know how to troubleshoot it.

Any help would be greatly appreciated.

Thanks.

Bharat

Generic-user-small
07 Nov 2008, 01:13
Bharat Ruparel (148 posts)

Making progress. Managed to save a record each in albums and covers table by cutting and pasting insert statements from the log. Went to the console as explained on page 100 of the book and tried to follow that. When I tried to save a covers record, I got the following trace:

bruparel@bruparel-Ubuntu1:~$ cd work/UploadImages/ bruparel@bruparel-Ubuntu1:~/work/UploadImages$ ./script/console Loading development environment (Rails 2.1.0) » c = Cover.find :first => #<Cover id: 1, album_id: 1, parent_id: nil, size: 9268, width: nil, height: nil, content_type: “image/jpeg”, filename: “male_main.jpg”, thumbnail: nil, created_at: “2008-11-06 18:47:20”, updated_at: “2008-11-06 18:47:20”> » Cover.count => 1 » c.public_filename => “/covers/0000/0001/male_main.jpg” » c.public_filename(:small) => “/covers/0000/0001/male_main_small.jpg” » c.public_filename(:medium) => “/covers/0000/0001/male_main_medium.jpg” » c.save! NoMethodError: undefined method after_attachment_saved_callback_chain' for #<Class:0xb6e97fe4> from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1667:in method_missing’ from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:272:in send' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:272:in run_callbacks’ from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/callbacks.rb:298:in callback' from /home/bruparel/work/UploadImages/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:385:in after_process_attachment’ from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:173:in send' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:173:in evaluate_method’ from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:161:in `call’ from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_sup

Is this a problem with attachment_Fu?

Thanks.

Bharat

Generic-user-small
07 Nov 2008, 03:30
Bharat Ruparel (148 posts)

Sorry to spam the forum, but I have gotten around the problem by installing ImageMagick and RMagick combination. Apparently, I have a problem with my installation of ImageScience and FreeImage. Does anyone have decent instructions for installing on Ubuntu 7.10? Thanks. Bharat

You must be logged in to comment