Strange urls from url_for_file_column


I got file_column working, but when I try

<%= image_tag url_for_file_column(“artifact”, “image”) %>

the resulting url generated is:


My document root for my rails application is

and the true path to the image is

… so you can see that it appears to be appending the path_to_the_image
to the wrong document root. Can anybody suggest how I might begin to
debug this?



It’s a hack, but:

In file_column_helper.rb

def url_for_file_column(object_name, method, suffix=nil)
object = instance_variable_get("@#{object_name.to_s}")
relative_path = object.send("#{method}_relative_path", suffix)
return nil unless relative_path
url = “”

sporb - comment out the following

url << @request.relative_url_root.to_s << “/”

sporb - add this line

url << "/"
url << object.send("#{method}_options")[:base_url] << "/"
url << relative_path


As I get better at this, i’ll, one day, know why… :slight_smile: