Skip to content
This repository has been archived by the owner on Sep 4, 2018. It is now read-only.

uninitialized constant Spree::MyApp #157

Open
christoph-buente opened this issue Aug 30, 2013 · 3 comments
Open

uninitialized constant Spree::MyApp #157

christoph-buente opened this issue Aug 30, 2013 · 3 comments

Comments

@christoph-buente
Copy link

NameError: uninitialized constant Spree::MyApp
~/Projects/shop/config/initializers/shop.rb:3:in <module:Spree>' ~/Projects/shop/config/initializers/shop.rb:2:in<top (required)>'

The example of the site wide preferences does not work. Where am i to define the Spree::MyApp::Config class?

module Spree
Spree::MyApp::Config = Spree::MyApplicationConfiguration.new
end

Spree::MyApp::Config[:theme] = "blue_theme"
Spree::MyApp::Config[:show_spash_page] = true
Spree::MyApp::Config[:number_of_articles] = 5

@radar
Copy link
Contributor

radar commented Sep 1, 2013

MyApp is only an example. Could you please show us where in what guide says to do this?

@christoph-buente
Copy link
Author

Of corse it is an example, but this class has be definded somewhere, even if i give it a different name. Where would i put it?

It is in the preference guide: https://github.com/spree/spree-guides/blob/master/content/developer/core/preferences.md
Line 283

@radar
Copy link
Contributor

radar commented Sep 4, 2013

It's most likely a bad example. What it should be is YourApplicationName, which matches the name inside config/application.rb.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants