为什么我得到未初始化的常量 Calabash::ABase (NameError)?

Why am I getting uninitialized constant Calabash::ABase (NameError)?

我正在使用 Calabash。我运行calabash-android gen如描述here。我有一个步骤定义、一个页面对象和一个功能。这是我的页面对象:

class LocationScanPage < Calabash::ABase  
    LIST_BUTTON_QUERY="com.facebook.react.views.text.ReactTextView marked:'List'"

    def trait
        LIST_BUTTON_QUERY
    end

    def await(opts={})
      wait_for_elements_exist([trait])
      self
    end
end

当我 运行 bundle exec calabash-android run .\app-releaseStaging.apk 我得到:

uninitialized constant Calabash::ABase (NameError)

require 'calabash-android' 添加到页面对象的顶部修复了它:

require 'calabash-android'

class LocationScanPage < Calabash::ABase  
    LIST_BUTTON_QUERY="com.facebook.react.views.text.ReactTextView marked:'List'"

    def trait
        LIST_BUTTON_QUERY
    end

    def await(opts={})
      wait_for_elements_exist([trait])
      self
    end
end

Calabash::ABase 定义为 here.