Skip to content

Namespacing Config Fails Out of the Box #210

Open
@brchristian

Description

I created a brand new Rails (6.0.3.3) app and added Deface to the Gemfile. I ran bundle.

Then, following the README, I went into config/application.rb and added the following:

config.deface.namespaced = true

When I try to run my Rails app, it crashes instantly, with:

ruby/2.6.6/gems/railties-6.0.3.3/lib/rails/railtie/configuration.rb:96:in `method_missing’:
undefined method `deface' for #<Rails::Application::Configuration:0x00007ffae8262448> (NoMethodError)
        from fooapp/config/application.rb:19:in `<class:Application>'                                               
	from fooapp/config/application.rb:10:in `<module:Fooapp>'
	from fooapp/config/application.rb:9:in `<top (required)>'
	from ruby/2.6.6/gems/spring-2.1.1/lib/spring/application.rb:92:in `require'
	from ruby/2.6.6/gems/spring-2.1.1/lib/spring/application.rb:92:in `preload'
	from ruby/2.6.6/gems/spring-2.1.1/lib/spring/application.rb:157:in `serve'
	from /ruby/2.6.6/gems/spring-2.1.1/lib/spring/application.rb:145:in `block in run'
	from /ruby/2.6.6/gems/spring-2.1.1/lib/spring/application.rb:139:in `loop'
	from /ruby/2.6.6/gems/spring-2.1.1/lib/spring/application.rb:139:in `run'
	from /ruby/2.6.6/gems/spring-2.1.1/lib/spring/application/boot.rb:19:in `<top (required)>'
	from -e:1:in `require'
	from -e:1:in `<main>'

What am I doing wrong?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions