Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions bin/couchbaseorm
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

def load_rails_environment_if_present
return if defined?(::Rails)

environment_path = File.expand_path('config/environment.rb', Dir.pwd)
return unless File.file?(environment_path)

require environment_path
end

load_rails_environment_if_present

require 'couchbase-orm'

def usage
Expand Down
Loading