在我的Rails应用程序中,我正在尝试添加如下视频:
<table class="table">
<tr>
<th width="25%">Candidate</th>
<th width="80%">Video</th>
</tr>
<tr>
<td>
<%= video_player({:file => "/assets/video/water_msg.flv"}, {:width => 470, :height => 400, :id => "water_msg_video", :onclick => "alert('clicked!');"}) %>
</td>
</tr>
</table>
我在:file
中使用上面的相对路径,但我收到以下错误:
video not found or access denied: /assets/video/water_msg.flv
当我使用完整路径(或链接)而不是像http://www.longtailvideo.com/jw/upload/bunny.mp4
这样的相对路径时,视频会播放。我该怎么办?
答案 0 :(得分:0)
尝试不使用/assets/
的路径:
<%= video_player({:file => "video/water_msg.flv"}, {:width => 470, :height => 400, :id => "water_msg_video", :onclick => "alert('clicked!');"}) %>