Why does the hero detect my sinatra application as rails and fail?

# Gemfile:
source 'https://rubygems.org'
ruby '1.9.3'
gem 'sinatra'
gem 'figaro'
gem 'octokit'

# app.rb
require 'sinatra'
require 'json'
require 'cgi'
require 'octokit'
require 'figaro'

class Application < Sinatra::Base
  get '/' do
    'Hi'
  end
end

# config.ru
require './app'
$stdout.sync = true
run Application

When click:
-----> Ruby/Rails app detected

However, if I remove figarogem and repush, it works fine.

+4
source share
1 answer

You answered yourself: figaro depend on Rails (see gemspec: https://github.com/laserlemon/figaro/blob/master/figaro.gemspec ). Heroku detects the use of rails if their Gemfile.lock contains a gem of Railties, which is a rails dependency.

So: yourapp → figaro → rails → railties.

, Rails. , Rails?

+3

All Articles