I’m developing a RoR app that uses a custom file type. I’m using
file_column plugin to upload the files into my rails application, and
that part works great. However I then need to render these files. I
have an application that does this, and is designed to be run from the
cgi directory. However, the integration between this cgi program and
my rails application is not working. For example:
The following URL works, the abc file is rendered properly:
So that tells me that my Apache has the abc file type registered
properly, and the abc program in the cgi directory runs properly.
The following URL gets me to the right file:
<%= link_to “http://localhost”+url_for_file_column(abctable,
So that tells me that the upload process is working.
However, it does not use the right rendering program from the cgi
directory, and that is my problem.
If I print out the url_for_file_column(abctable, ‘abc’) field, it does
have the right relative path, including the proper file extention. I
have tried using button_to, and using localhost instead of localhost:
3000, and just the relative path names. None of those things worked.
In rails, I have an object called abctable which has a string field
called abc that contains the filename.
I configured Apache with this:
Action application/x-httpd-abc /cgi-bin/abc2cgi
AddType application/x-httpd-abc abc
Thanks for any help.