Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

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

#2583

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)

Reported by Takeshi Morita · April 29th, 2009 @ 10:56 PM

State: invalid
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. thedarkone
    thedarkone

    I think this is fixed in 2-3-stable.

    April 30th, 2009 @ 10:21 AM

  2. Takeshi Morita
    Takeshi Morita

    I'm sorry for the confusion that I've caused. I confirmed that this problem solved in git repository.

    April 30th, 2009 @ 11:27 AM

  3. CancelProfileIsBroken
    CancelProfileIsBroken
    • State changed from new to invalid

    May 16th, 2009 @ 06:32 PM