I have such problem : I want to render html file, but I’m failing to set path to my file.
I need to say, that I’m runnung Rails on Windows.
In my view I have code :
<%= render :file => '1509/1509/app/views/static_pages/index.html', :layout => false %>
but this gives me error:
undefined method `virtual_path' for false:FalseClass
My file lies here:
C:\1509\1509\app\views\static_pages
Also tried:
<%= render :file => '/views/static_pages/index.html', :layout => false %>
But this gives me:
Missing template /views/static_pages/index with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee]}. Searched in:
* "c:/1509/1509/app/views"
* "C:/Ruby192/lib/ruby/gems/1.9.1/gems/devise-2.1.0/app/views"
* "c:/1509/1509"
* "c:/"
What I’m doing wrong ?
Absolute path would be:
Relative path: