Phusion Passenger error

Hi All,

I am having an ROR application deployed on server, it is throwing the
following error on server when user uploads an image:

ActionController::RoutingError (No route matches
“/images/<image_name>.png” with {:method=>:get}):
passenger (2.2.15) lib/phusion_passenger/rack/request_handler.rb:92:in
process_request' passenger (2.2.15) lib/phusion_passenger/abstract_request_handler.rb:207:inmain_loop’
passenger (2.2.15)
lib/phusion_passenger/railz/application_spawner.rb:441:in
start_request_handler' passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:381:inhandle_spawn_application’
passenger (2.2.15) lib/phusion_passenger/utils.rb:252:in safe_fork' passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:377:inhandle_spawn_application’
passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in
__send__' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:inmain_loop’
passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:196:in
start_synchronously' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:163:instart’
passenger (2.2.15)
lib/phusion_passenger/railz/application_spawner.rb:222:in start' passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:253:inspawn_rails_application’
passenger (2.2.15)
lib/phusion_passenger/abstract_server_collection.rb:126:in
lookup_or_add' passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:247:inspawn_rails_application’
passenger (2.2.15)
lib/phusion_passenger/abstract_server_collection.rb:80:in synchronize' passenger (2.2.15) lib/phusion_passenger/abstract_server_collection.rb:79:insynchronize’
passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:246:in
spawn_rails_application' passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:145:inspawn_application’
passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:278:in
handle_spawn_application' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:insend
passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in
main_loop' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:196:instart_synchronously’

Note: I am using attachment_fu for image uploading.

Anyone is having any solution on this??

Thanks

Saurabh

Saurabh P. wrote:

Hi All,

I am having an ROR application deployed on server, it is throwing the
following error on server when user uploads an image:

ActionController::RoutingError (No route matches
“/images/<image_name>.png” with {:method=>:get})

Thanks

Saurabh

Hi Saurabh,
This error does not seem to be a passenger issue.
This is related to routes. Add proper route to environment.rb for
uploading of images.

Hope this solves your problem.

Thanks,
Anubhaw

Anubhaw P. wrote:

Saurabh P. wrote:

Hi All,

I am having an ROR application deployed on server, it is throwing the
following error on server when user uploads an image:

ActionController::RoutingError (No route matches
“/images/<image_name>.png” with {:method=>:get})

Thanks

Saurabh

Hi Saurabh,
This error does not seem to be a passenger issue.
This is related to routes. Add proper route to environment.rb for

Add proper route to route.rb.

Thanks,
Anubhaw

dont add a route for that, is in the public directory there is no need
for
that, everything static is server by the web server no by rails so
creating
a route in the route file makes no sense. Are you using capistrano and
paperclip? in that case that is not the right path, capistrano updates
the
sym links on every release so everything that needs to be persistent has
to
be inside the public/system/
tell me your deployment environment to see if i can help.

radhames brito wrote:

dont add a route for that, is in the public directory there is no need
for
that, everything static is server by the web server no by rails so
creating
a route in the route file makes no sense. Are you using capistrano and
paperclip? in that case that is not the right path, capistrano updates
the
sym links on every release so everything that needs to be persistent has
to
be inside the public/system/
tell me your deployment environment to see if i can help.

Hi radhames,

I am using attachment_fu for image uploading. Images are getting created
in public/pictures/0000/0001/<image_name>

Thanks,

Saurabh

Anubhaw P. wrote:

Anubhaw P. wrote:

Saurabh P. wrote:

Hi All,

I am having an ROR application deployed on server, it is throwing the
following error on server when user uploads an image:

ActionController::RoutingError (No route matches
“/images/<image_name>.png” with {:method=>:get})

Thanks

Saurabh

Hi Saurabh,
This error does not seem to be a passenger issue.
This is related to routes. Add proper route to environment.rb for

Add proper route to route.rb.

Thanks,
Anubhaw

Hello Mr. Anubhaw P.,

I have tried it but still it is throwing the same error.

Thanks,

Saurabh

On 7 September 2010 08:38, Saurabh P. [email protected] wrote:

be inside the public/system/
tell me your deployment environment to see if i can help.

Hi radhames,

I am using attachment_fu for image uploading. Images are getting created
in public/pictures/0000/0001/<image_name>

Are you sure the message is coming from the upload and not from the
action after the upload completes? Check your code to see what you do
after the upload (is it attempting to show the picture, using the
wrong path?) and have a look in the log file to get more clues.

Colin

Colin L. wrote:

On 7 September 2010 08:38, Saurabh P. [email protected] wrote:

be inside the public/system/
tell me your deployment environment to see if i can help.

Hi radhames,

I am using attachment_fu for image uploading. Images are getting created
in public/pictures/0000/0001/<image_name>

Are you sure the message is coming from the upload and not from the
action after the upload completes? Check your code to see what you do
after the upload (is it attempting to show the picture, using the
wrong path?) and have a look in the log file to get more clues.

Colin

Hi Colin,

Error occurs when the upload_image method gets called, picture is not
getting saved on server. It is not able to complete the upload request.

Thanks
Saurabh

On 7 September 2010 09:00, Saurabh P. [email protected] wrote:

Are you sure the message is coming from the upload and not from the
action after the upload completes? Check your code to see what you do
after the upload (is it attempting to show the picture, using the
wrong path?) and have a look in the log file to get more clues.

Error occurs when the upload_image method gets called, picture is not
getting saved on server. It is not able to complete the upload request.

OK, I was confused by the fact that you said the images were getting
created in public/pictures/0000/0001/<image_name>, but now you say
they are not getting saved at all.

Colin

What are you using to deploy ? are you using capistrano? and by the way
paperclip is much better than attachment_fu

watch this screencast #134 Paperclip - RailsCasts ,
it is
important to now is your are using capistrano(you should be!), and put a
bit
of your vew code when you present the pictures, i need to see some of th
code to help.