dobleUber
dobleUber

Reputation: 576

Refinerycms and public folder => Couldn't find Refinery::Page with 'id'=404

I had a project with refinerycms(branch master) and rails 4.1.1.

I'm using carrierwave to upload images and related to a model. The file upload works fine, I saw the images in the public folder: public/uploads/related_file/file/1/test.jpg

I'm trying to access to that image with the path

http://localhost:3000/uploads/related_file/file/1/test.jpg

<%= image_tag related_file.file_url if related_file.file_url.present?%>

but I'm getting a 404 error.

Started GET "/uploads/related_file/file/1/test.jpg" for 127.0.0.1 at 2014-09-25 15:43:31 -0500 Processing by Refinery::PagesController#show as JPEG Parameters: {"path"=>"uploads/related_file/file/1/test", "locale"=>:en}

Just for testing I'm trying to access the pages 404.html and 505.html at public folder, but this time I'm getting these errors

Couldn't find Refinery::Page with 'id'=404 Couldn't find Refinery::Page with 'id'=500

Apparently refinery is intercepting the requests to public folder.

How I can fix that? I just need see the uploaded images in my page, how I can do it??

Edit:

Just for testing I added an image test.jpg to my public folder. when I tried to see that image in the browser I got a 404 error page.

http://localhost:3000/test.jpg

Started GET "/test.jpg" for 127.0.0.1 at 2014-09-26 09:57:53 -0500
Processing by Refinery::PagesController#show as JPEG
  Parameters: {"path"=>"test", "locale"=>:en}

Please I need help...

Thanks

Upvotes: 2

Views: 296

Answers (0)

Related Questions