This project is archived and is in readonly mode.

#2276 ✓resolved
Bivi

render :file doesn't work for absolute path on windows

Reported by Bivi | March 17th, 2009 @ 06:01 PM | in 2.x

On rails 2.3.2 if you try (on windows system):


render :file => "C:/myapp/app/views/main/home.html.erb"

you'll have a problem due to "C:/" which is not recognized as an absolute pathname.

I suspect a problem at the line 64 in "actionpack-2.3.2\lib\action_view\paths.rb" and propose the new regexp : /\A(\/|[a-zA-Z]:\/)/

But there is another problem at the line 112 in "actionpack-2.3.2\lib\action_view\template.rb" because


File.join("", "C:/myapp/app/views/main/home.html.erb") -> "/C:/myapp/app/views/main/home.html.erb"

So, for the moment, I'll use only relative paths.

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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Referenced by

Pages