I need to detect rack apps and rails 2 apps by simply inspecting the files in a project.
I've been able to do this for rack apps by checking for the existence of a config.ru file. Is there something similar I could check for in a rails 2 app?
From Phusion Passeger documentation: Phusion Passenger checks whether the virtual host is a Rails application by checking whether the following file exists:
dirname(DocumentRoot) + "/config/environment.rb"
This file exists also for rails 3 projects if that is a problem :/.
In config/environment.rb you can look for RAILS_GEM_VERSION = '2.x.x'
In Gemfile.lock for rails (2.x.x)
In Gemfile for gem 'rails', '2.x.x'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With