I have a project called "Project" and the PDF file is "file.pdf" located at Project/app/assets/file.pdf. I want to make a PDF on a page called "file.html" located at Project/app/views/static/file.html.
I wrote the following code, but everything that is displayed is an empty white box.
<embed src="../../assets/file.pdf" width="500" height="375" type='application/pdf'>
I am sure my browser cannot find the file. What can i do wrong?
UPDATE: I also tried it with the image placed in app/assets/images/Image.png, for example:
<embed src="../../assets/images/Image.png" width="500" height="375" type='image/png'>
but this is not displayed either.
UPDATE 2: Console Output:
GET "/ file" will start for 127.0.0.1 at 2016-02-21 04:48:27 -0600 Processing by StaticController # file as HTML
static/file.html.erb / (63.8ms)
200 OK 757ms (: 749.4ms | ActiveRecord: 0.0ms)
GET "/assets/application.self-e570ac372b74f676a029186250aeeba9bf7016bcd014314d103b5d18b3eb858e.css?body=1" 127.0.0.1 2016-02-21 04:48:28 -0600
GET "/assets/pdf-8f705790d319666d8f804cf8809f4d74f036483049ef8c520646d6c98ebedc5f.png" 127.0.0.1 2016-02-21 04:48:28 -0600
GET "/assets/Advanced_Reading_Sample.pdf" 127.0.0.1 2016-02-21 04:48:28 -0600