This project is archived and is in readonly mode.

#2583 ✓invalid
Takeshi Morita

render :file=> absolute_path doesn't work in Windows

Reported by Takeshi Morita | April 29th, 2009 @ 10:56 PM | in 2.x

Environment: Windows XP and Rails 2.3.2

I installed plugin selenium on rails. but it doesn't work. Because render :file=>absolute_path doesn't work in rails 2.3.2 of Windows.

example

class BlogsController < ApplicationController def index

@blogs = Blog.all
respond_to do |format|
  format.html { 
   render :file => "D:/testapp/app/views/blogs/index.html.erb"}
  format.xml  { render :xml => @blogs }
end

end end

access result

Invalid argument - ./D:/testapp/app/views/blogs/index.html.erb d:/Program Files/ruby-1.8/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/template.rb:185:in read'

I think find_template is something wrong. Below code is only considerd unix like system. actionpack-2.3.2\lib\action_view:64

  return Template.new(original_template_path, original_template_path =~ /\A\// ? "" : ".") if File.file?(original_template_path)

actionpack-2.3.2\lib\action_view:112

@load_path, @filename = load_path, File.join(load_path, template_path)

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

Pages