Dynamic JS or RJS ?

you should wrap that code in a function that you can pass the filename
and call the function the layout/view, maybe in the header:

<%= javascript_tag

then you just have to set @my_ruby_variable_with_filename_for_player
somwhere in you controller, like the current action or a before_filter
(don't know what you need, depends on your goal here)

you could test on linux by:
A) booting into a live cd (heaps available on the net).
B) running linux in a VM (just download a prebuilt one for your VM software of choice).
C) use the live CD in an existing VM if you have one (save building one).

If you don’t have an VM software installed I can recommend VirtualBox, it’s free and available for Windows, Mac & Linux hosts.

If the “MediaPlayer” referred to in your script is the Windows Media Player then it will only work in Windows however and not on Linux or Mac. You would want to investigate using a Flash based player for the most compatibility.