I have a form which lets users upload an flv file to the database, this
should then be played by the “player.swf” file in the public directory.
This worked fine when on the homepage as I just referenced “player.swf”
in the html embed tag and it worked fine.
However if I left that directory eg homepage/something else, I had to
change the link to the swf file to make it work, like this.
I wanted to be able to use the same code throughout my application, so I
thought Rails.root would help, but for some reason, the video does not
display when using this technique.
Rails.root = “C:/Users/Me/Desktop/myapp”
<embed src="<%= Rails.root+"/public/player.swf" %> (Which is then
Can anyone help me shed any light on why this might not be working?