If you have this file in app/assets/javascript the file will be evaluated only once, in development it is when you request it the first time after download. In production it will be the time as you precompile it.
In production also it would be contraproductive if you would compile it everytime, as it would mean to compile everyfile again and again and concatenize and minify them. Your user would have to download a large file with every request, what would be just against the meaning of the concatenized huge javascript file.
If you really need that javascript file to be dynamically created with every request, use it as a view.