Domanda

I'm using High Voltage for static pages in a Rails 4 app. I'd like to specify a static home page as outlined here but I get the following error on server bootup:

undefined method `configure' for HighVoltage:Module (NoMethodError)

I have a high_voltage.rb file in config/initializers so can't understand what's going wrong here. High Voltage works fine besides this.

UPDATE:

Gemfile has the following line:

gem 'high_voltage'

Gemfile.lock:

high_voltage (2.0.0)

high_voltage.rb:

HighVoltage.configure do |config|
  config.home_page = 'home'
end
È stato utile?

Soluzione

If you have a look at the codebase of version 2.0 here: https://github.com/thoughtbot/high_voltage/tree/11e38c643ff8b5ea1c6e04999034a8d5bcb4f711

There is no such version implemented in the gem.

It was added just recently: https://github.com/thoughtbot/high_voltage/commit/1668e54be41dd50f6c36ac6ab6d46069ffd0d636

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top