Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6809453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:05:19+00:00 2026-05-26T20:05:19+00:00

inside index.html.erb there is the following code <video width=320 height=240 controls=controls> <source src=truffle1.mp4/> Your

  • 0

inside index.html.erb there is the following code

<video width="320" height="240" controls="controls">
      <source src="truffle1.mp4"/>
 Your browser does not support the video tag.
</video>

I am not sure where to put my mp4 video file so I put it at several places.
Next I fire up the rails server and use Chrome to open the index page. I see the black video frame but it does not play. and when I try open video in a new window. I get
No route matches [GET] “/admin/truffle1.mp4”
(note admin is just the namespace for the controller).


seems like this is a rails routing problem…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:05:19+00:00Added an answer on May 26, 2026 at 8:05 pm

    When you say src="truffle1.mp4"you’re telling Rails to look for that file from the current route (you’re probably on localhost:3000/admin if you’re trying it on a local server, so it’s looking in localhost:3000/admin/truffle1.mp4).

    You could try giving it the route from the home of your app like so: src="/assets/media/truffle1.mp4", and put the file in that directory (you’ll probably have to create it).

    EDIT

    Following the answer provided by @Pragnesh Vaghela, I managed to make it work. Your first intuition was right. You’re missing routing if you want to have your videos in /assets/videos. When you say:

    <%= video_tag "truffle1.mp4", :size => "320x240", :controls => true %>
    

    the server will look for the file in all the assets directories that have been routed (by default: stylesheets, images, and javascripts). If you put your video in images, it should work, for example. If you want to have the /assets/videos directory searched also, you have to add the following line to your config/application.rb file:

    config.assets.paths << "#{Rails.root}/app/assets/videos"
    

    You can put it under the line that says:

    config.assets.enabled = true
    

    I believe.

    Hope this works.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Inside my index.html.erb <script type= text/javascript> var msg = Hello World ; </script> i
I include myscript.js in the file http://site1.com/index.html like this: <script src=http://site2.com/myscript.js></script> Inside myscript.js, I
Okay, consider the following: A app/views/pages/index.html.erb , consisting of: <div id='content'> <%= link_to 'Test',
Inside http://mydomain1.com/index.html <html> <body> <script type=text/javascript> var a = 1; </script> <iframe src=http://domain2.com/test2.html></iframe> </body>
How can I rewrite http://localhost/index.php?page=sample into http://localhost/page/sample . The only code inside my htaccess
I have a index.html file which loads html files. $('#content').load(url,function() {}); Inside those html
I have a classifieds website, and in the index.html there is a form. This
so i have a problem with :partial rendering... I have: index.html.erb view with content
I've been trying to match the following string: string = TEMPLATES = ( ('index.html',
I heard that Racket could be embedded (maybe also with C++). http://docs.racket-lang.org/inside/index.html http://docs.racket-lang.org/foreign/index.html But

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.