Skip to content

Commit 1f61da9

Browse files
authored
Merge pull request #687 from TSMMark/patch-1
Handle when Rails is partially loaded as a Gem
2 parents 9a0e280 + 64e43e4 commit 1f61da9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/split/dashboard.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Dashboard < Sinatra::Base
2626
@metrics = Split::Metric.all
2727

2828
# Display Rails Environment mode (or Rack version if not using Rails)
29-
if Object.const_defined?("Rails")
29+
if Object.const_defined?("Rails") && Rails.respond_to?(:env)
3030
@current_env = Rails.env.titlecase
3131
else
3232
@current_env = "Rack: #{Rack.version}"

0 commit comments

Comments
 (0)