0

我在 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
4

1 回答 1

1

如果您在这里查看 2.0 版的代码库:https ://github.com/thoughtbot/high_voltage/tree/11e38c643ff8b5ea1c6e04999034a8d5bcb4f711

gem 中没有实现这样的版本。

它是最近添加的:https ://github.com/thoughtbot/high_voltage/commit/1668e54be41dd50f6c36ac6ab6d46069ffd0d636

于 2014-01-06T13:12:35.840 回答