I tried the last 2 hours to make HTML5 Video work. Can someone show me what I'm doing wrong? I have a home controller that has ONLY one action called indexthat I use to render the main page (index.html.erb). My route file:
TEST::Application.routes.draw do
get "home/index"
root :to => 'home#index'
..
..
There are ONLY THESE LINES in the index.html.erb file:
<div class="row"> <h3>TEST </h3> </div>
<div class="row">
<div class="span12">
<%= video_tag("test_video_1.ogg", :size => "320x240", :controls => true, :autobuffer => true) %>
</div>
</div>
I added this to my config / application.rb file:
config.assets.enabled = true
config.assets.paths << "#{Rails.root}/app/assets/videos"
There is a stupid video file. In "/ app / assets / videos". I am using a thin server. Now why am I getting this error?
Started GET "/videos/test_video_1.ogg" for 127.0.0.1 at 2012-10-01 13:13:00 +0100
ActionController::RoutingError (No route matches [GET] "/videos/test_video_1.ogg"):
Can someone explain to me what is going on?
source
share