This project is archived and is in readonly mode.

#3546 ✓resolved

Absolute file-path in windows get leading './'

Reported by Martin | December 7th, 2009 @ 04:22 PM

When using an absolute file path like
'D:/path/to/project/vendor/plugin/views/view.rhtml' with render :file,
rails will look for
'./D:/path/to/p....' and crashs with Invalid Argument Error because of the './' at the beginning of the string.

I tracked it down to 'find_template' in actionpack/lib/action_view/paths.rb.
In line 64 the load path for the template is determined with '.', because it doesn't start with '/'.

And in actionpack/lib/action_view/template.rb in line 112, the File.join will add a '/' (even if paths.rb is altered, so that it doesn't add the dot).

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket