I'm trying to obtain the current version of nginx in Ruby. I've tried all of these, and nothing seems to work:
a = `nginx -v`
puts a # ==> nil
a = `nginx -V`
puts a # ==> nil again
a = system('nginx -v')
puts a # ==> nil
Anybody know how I can obtain this data? Strange behaviour. Same for postgres and ruby work fine.