Heroku Rails App Detection
Recently while deploying an app to Heroku I noticed that the Sinatra app I was deploying was somehow being detected as a Rails app. Whenever I ran heroku run console. I would get the following error:
Running console attached to terminal... up, run.1 bundler: command not found: script/console Install missing gem executables with `bundle install`
For some reason Heroku was looking for the Rails console. I thought about how one might detect the differences between these two types of apps and what the heuristics of a Rails app may be. Then I realized I had used a Rails convention in my app. I used config/environment.rb as a way to manage multiple envs for my app. I quickly changed this files name to config/env.rb and re-deployed. This immediately fixed the problem and Heroku now detects the Ruby/Rack application.
Lesson learned.




