Hi, I tried to get file_column working on windows last night, but with no success. Is there anyone here that got it working on windows? I couldn''t find any help in the wiki or Sebastian''s site or the mailing list archives. in the archive i found a line in the TODO file that read: "* test (and make it run) on windows" Any ideas of when this might be sorted? or where in the code I can start looking for the problem?
Hi, 2005/10/20, Francois Paul <francois@bagasie.com>:> I tried to get file_column working on windows last night, but with no > success. Is there anyone here that got it working on windows? I couldn'tWhat problems did you have ? I have successfully used file_column before on Windows. Bye, François _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Hi François, this is the error I get, i have checked that the file is actually uploaded to the quoted path. any insight would be apreciated. Thanks, Francois Errno::ENOENT in Products#create No such file or directory - file -bi "/public/product/image_url/tmp/1129829401.218000.4880/parsb.gif" |/app/controllers/products_controller.rb:20:in `new'' /app/controllers/products_controller.rb:20:in `create'' script/server:49| <http://localhost:3000/products/create#> |/vendor/file_column.rb:243:in ``'' /vendor/file_column.rb:243:in `get_content_type'' /vendor/file_column.rb:138:in `store_upload'' /vendor/file_column.rb:98:in `upload'' /vendor/file_column.rb:42:in `assign'' /vendor/file_column.rb:470:in `image_url='' /vendor/file_column.rb:469:in `image_url='' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:1071:in `send'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:1071:in `attributes='' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:1070:in `each'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:1070:in `attributes='' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:931:in `initialize_without_callbacks'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/callbacks.rb:236:in `initialize'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in `send'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in `perform_action_without_filters'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/filters.rb:295:in `perform_action_without_benchmark'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `measure'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/rescue.rb:80:in `perform_action'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `send'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `process'' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/dispatcher.rb:32:in `dispatch'' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:105:in `handle_dispatch'' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:71:in `service'' c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' c:/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' c:/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each'' c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:57:in `dispatch''| Francois Beausoleil wrote:>Hi, > >2005/10/20, Francois Paul <francois-VKbYeNyhmt9BDgjK7y7TUQ@public.gmane.org>: > > >>I tried to get file_column working on windows last night, but with no >>success. Is there anyone here that got it working on windows? I couldn''t >> >> > >What problems did you have ? I have successfully used file_column >before on Windows. > >Bye, >François > > >------------------------------------------------------------------------ > >No virus found in this incoming message. >Checked by AVG Anti-Virus. >Version: 7.0.344 / Virus Database: 267.12.1/136 - Release Date: 10/15/2005 > >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Hi, 2005/10/20, Francois Paul <francois@bagasie.com>:> Errno::ENOENT in > Products#create > > No such file or directory - file -bi > "/public/product/image_url/tmp/1129829401.218000.4880/parsb.gif"Oops, you have the latest version of FileColumn. I seem to remember Sebastian talking about that problem. I've copied Sebastian. On Unix/Linux, there's a program named "file" which returns the content type of a file. FileColumn is attempting to start that program to get the newly uploaded file's type. This needs to be disabled on Windows and fallback to name parsing alone. I don't have the latest file column's source code near at hand, so I can't really patch it, but if you do, be sure to post back your solution here, so Sebastian can be informed. Hope that helps, François _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Hi Francois, On 10/20/05, Francois Paul <francois-VKbYeNyhmt9BDgjK7y7TUQ@public.gmane.org> wrote:> this is the error I get, > i have checked that the file is actually uploaded to the quoted path. > any insight would be apreciated.okay, this is cause by file_column trying to invoke the "file" utility to guess the files content-type and check if the extension is correct. I thought this would be handled gracefully if this program is not present, but obviously it is not. You can fix your file_column for now by replacing the get_content_type method in lib/file_column.rb with this version: def get_content_type(fallback=nil) content_type end I''ll release a fixed version soon. Sebastian
You could try installing File for Windows. You can get it from http://gnuwin32.sourceforge.net/packages/file.htm Francois Beausoleil wrote:> Hi, > > 2005/10/20, Francois Paul <francois-VKbYeNyhmt9BDgjK7y7TUQ@public.gmane.org>: > >>Errno::ENOENT in >> Products#create >> >> No such file or directory - file -bi >>"/public/product/image_url/tmp/1129829401.218000.4880/parsb.gif" > > > Oops, you have the latest version of FileColumn. I seem to remember > Sebastian talking about that problem. I''ve copied Sebastian. > > On Unix/Linux, there''s a program named "file" which returns the > content type of a file. FileColumn is attempting to start that > program to get the newly uploaded file''s type. This needs to be > disabled on Windows and fallback to name parsing alone. > > I don''t have the latest file column''s source code near at hand, so I > can''t really patch it, but if you do, be sure to post back your > solution here, so Sebastian can be informed. > > Hope that helps, > François > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Thanks Sebastian! It all seems to work fine now. Regards, Francois Sebastian Kanthak wrote:>Hi Francois, > >On 10/20/05, Francois Paul <francois-VKbYeNyhmt9BDgjK7y7TUQ@public.gmane.org> wrote: > > >>this is the error I get, >>i have checked that the file is actually uploaded to the quoted path. >>any insight would be apreciated. >> >> > >okay, this is cause by file_column trying to invoke the "file" utility >to guess the files content-type and check if the extension is correct. >I thought this would be handled gracefully if this program is not >present, but obviously it is not. > >You can fix your file_column for now by replacing the get_content_type >method in lib/file_column.rb with this version: > > def get_content_type(fallback=nil) > content_type > end > >I''ll release a fixed version soon. > >Sebastian >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > > > >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails