where to look for errors besides nginx error logs
Hi,
My currently deployed Rails app seems to have issues with uploading images to Amazon S3 storage through CarrierWave.
I get the familiar "We're sorry, but something went wrong." message.
I checked the nginx log file (/var/log/nginx/error.log), but I don't see any error messages there at today's date.
So my question is where else can I look for error logs?
I sat the
passenger_friendly_error_pages on
but I'm not getting a friendly error page, so I think the issue isn't Passenger related.
thanks for your help,
Anthony
apparently the errors do appear in the /var/log/nginx/error.log
Everytime I try to upload a image, I get this type of error:
App 11210 stdout: Started PATCH "/admin/researchers/11" for 157.193.240.200 at 2014-09-16 05:55:16 -0400
App 11210 stdout: Processing by Admin::ResearchersController#update as HTML
App 11210 stdout: Parameters: {"utf8"=>"?~\~S", "authenticity_token"=>"some-token=
", "researcher"=>{"active"=>"1", "first_name"=>"Lesley", "last_name"=>"Hustinx", "title"=>"Associate Professor", "bio
"=>"<p><span>Research interestsSociology, civil society, nonprofit sector, citizenship, citizen participation, solida
rity, social capital, volunteering and philanthropy</span><br></p>", "email"=>"lesley.hustinx@ugent.be", "phone"=>"",
"address"=>"", "image"=>#<ActionDispatch::Http::UploadedFile:0x007f9e0b9fb978 @tempfile=#<Tempfile:/tmp/RackMultipar
t20140916-11210-1ijifg0>, @original_filename="lesley_hustinx.jpg", @content_type="image/jpeg", @headers="Content-Disp
osition: form-data; name=\"researcher[image]\"; filename=\"lesley_hustinx.jpg\"\r\nContent-Type: image/jpeg\r\n">, "c
ourse_ids"=>["7", ""], "research_project_ids"=>[""]}, "button"=>"", "id"=>"11"}
App 11210 stdout: Completed 500 Internal Server Error in 21ms
App 11210 stdout:
App 11210 stdout: Errno::ENOENT (No such file or directory - identify):
App 11210 stdout: app/controllers/admin/researchers_controller.rb:30:in `update'
The code of my researchers#update method looks like this:
def update
@researcher = Researcher.find(params[:id])
if @researcher.update_attributes(researcher_params)
redirect_to admin_researchers_path, notice: "you successfully updated the researcher #{@researcher.fullname}"
else
flash[:alert] = @researcher.errors.full_messages.join(' ')
render :edit
end
end
does anyone have an id what the problem might be? I'm using Carrierwave to upload my images to Amazon S3
thanks for your help,
Anthony
found the solution. The issue was caused because ImageMagick wasn't installed on the server. Installing ImageMagick with this command solved my problem:
sudo apt-get install imagemagick libmagickcore-dev libmagickwand-dev
So the problem wasn't with Amazon S3 but was an issue with rmagick/ImageMagick?
I'm using CarrierWave and looking to do auto-resize of images on upload. Is there any configuration that needs to happen in production after you install ImageMagick using apt? I'd really like to get the auto-resize functionality working in my app.
Glad you got the problem solved.