ruby on rails - `/usr/bin/file -i SOME_FILE` returns different result when deployed to Phusion Passenger -


i'm using /usr/bin/file -i some_file detect whether contains non-ascii-and-utf characters. however, produces different result when application deployed apache+passenger.

in 'script/console', above line gives: some_file: text/plain; charset=utf-8

in passenger, gives:

some_file: regular file

since pointing absolute path of 'file', strange. i'm guessing library used different in passenger. comments?

if not right way detect text file's encoding, best approach(in ruby)?

thank much.

i'm guessing difference between versions of 'file' utility between development machine , server. have tried running them terminal of both machines?


Comments

Popular posts from this blog

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c# - Making TableLayoutPanel Act Like An HTML Table (Cells That Resize Automatically Around Text) -