我在 Rails 4 应用程序中对静态页面使用高压。我想指定一个静态主页,如此处所述,但在服务器启动时出现以下错误:
undefined method `configure' for HighVoltage:Module (NoMethodError)
我在 config/initializers 中有一个 high_voltage.rb 文件,所以无法理解这里出了什么问题。除此之外,高压工作正常。
更新:
Gemfile 有以下行:
gem 'high_voltage'
Gemfile.lock:
high_voltage (2.0.0)
高电压.rb:
HighVoltage.configure do |config|
config.home_page = 'home'
end