File_column issues on dreamhost

ok, here’s the deal. I’m having an issue using the file_column plugin on
dreamhost. Everything works great on my local dev machine using
webrick. On dreamhost i have no errors, but initially the uploaded
images where stored in /public/user/…etc… When the image should have
displayed I just got the filename instead.

I though it might be a routing issue, so I tweaked the file_column.rb
to:

options[:store_dir] ||= File.join(options[:root_path], “/images”, model,
attr)

This got the uploaded images storing into /public/images/user/…etc…
I also changed file_column_helper.rb to:

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

That should accomidate for the display url pointing to the new location.
When I look at the page source, i get:

P1010060_1 (P1010060_1.jpg IS the name of my image)

Looks to me like the html and path are ok. I have no problem displaying
anything in the root of the /images/ folder. But, if I try to go to
www.mydomain.com//images/user/pic/9/P1010060_1.jpg I get a 404 error. I
think I’m hitting a weird routing issue. Has anyone run into anything
like this with dreamhost or other providers?

Oh, I also checked via ftp, and the file is not corrupted.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs