My development environment is in Windows, and my production of rails is in Linux.
There are possibility that VirtualHost will be use. Assume that one finename need to call in /public folder with File.open('/tmp/abc.txt', 'r').
but in my Windows it should be "C:\tmp\abc.txt". How can i do a right join path with two difference environment?
prefix_tmp_path = '/tmp/'
filename = "/#{rand(10)}.txt"
fullname = prefix_tmp_path + filename # /tmp//1.txt <- which i don't want double //
and if prefix_tmp_path = "C:\tmp\" # C:\tmp\/1.txt
is it possible to do a right joining?