When I use an erb method using:
require 'erb'
def erb(template)
path = File.expand_path("../views/#{template}", __FILE__)
ERB.new(File.read(path)).result(binding)
end
And afterward use a:
Rack::Response.new(erb('default.html.erb'))
It raises an Errno::ENOENT. Why is this? Thanks!
Looks like you may have gotten your file path wrong. Check to make sure that’s right.