I want to put a player on a web page and I am using mp3_player (https://github.com/sekrett/mp3_player). I have the plugin installed and everything works, except that the player can’t find the path to the file. I have put the file named file.mp3 in the public folder and made the following tags in my code:
$ <%= mp3_player(“/public/file.mp3”) %>
The player appears on the page, but when I click play the player says the file is missing. The following routingerror appears in the log:
ActionController::RoutingError (No route matches [GET] “/public/file.mp3”)
What am I doing wrong and is there an easy way to fix this?
Try to write
<%= mp3_player("/file.mp3") %>.“Public” folder is a root folder of your project.