I tried to upload a image using Carrierwave and the upload hanged on forever without concluding the upload or giving an error.
After that the server didn't respond to any more request, even after I restart it. When I start the server now, it starts normally, with the server log just saying "Connecting to database specified by database.yml". However, it doesn't respond to any requests, making the browser hang on forever waiting for a response (without throwing an error).
This happened after I tried to make an upload using the Carrierwave gem, so I think that might be related. Although I can't understand why/how this happens.
I'm sorry, as requested here it comes more information:
This is happening in development, in windows 8 and I'm using RMagick. I restarted the computer and the server started again to respond to requests. When I tried to make an upload the server did not respond to the request and hanged on indefinitely without throwing and error or a response. After that, the server stop responding to any request.
In the directory when the images should be stored I found a "tmp" directory with 2 images there, the original I uploaded and a "small" one, leaving me thinking that the problem is occurring after the first resize of RMagick.
Here is some data:
Rails version: 3.12.2 Carrierwave version: 0.8.0 RMagick version: 2.13.2 ImageMagick version: 6.8.1-0
The uploader class:
class ImageUploader < CarrierWave::Uploader::Base
# Include RMagick or MiniMagick support:
include CarrierWave::RMagick
# Choose what kind of storage to use for this uploader:
storage :file
# Override the directory where uploaded files will be stored. # This is a sensible default for uploaders that are meant to be mounted:
def store_dir
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end
# Provide a default URL as a default if there hasn't been a file uploaded:
def default_url
'/uploads/user/' + [version_name, 'no_photo.png'].compact.join('_')
end
version :small do
process :resize_to_limit => [30, 30]
end
version :medium do
process :resize_to_limit => [70, 70]
end
version :large do
process :resize_to_limit => [125, 125]
end
end