Skip to content

Server Error #2

@jefffis

Description

@jefffis

After installing this module, when you try to run it the project locally, unless you are logged into the CMS, you receive a generic server error rendered out. The stack trace of this is as follows:

Exception: undefined method browsercms_cache_directory' for #<Rails::Application::Configuration:0x0000010187e5b8> /Users/jdoan/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.9/lib/rails/railtie/configuration.rb:77:inmethod_missing'
/Users/jdoan/.rvm/gems/ruby-1.9.2-p290/gems/bcms_mobile-1.0.0/lib/bcms_mobile/mobile_aware.rb:40:in cms_cache_directory' /Users/jdoan/.rvm/gems/ruby-1.9.2-p290/gems/bcms_mobile-1.0.0/lib/bcms_mobile/engine.rb:36:inconfigure_cache_directory'
/Users/jdoan/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.9/lib/active_support/callbacks.rb:462:in `_run__299973198460822490__process_action__3273094018654080844__callbacks'

To get around this, simply add the following to the development.rb file in /environments

config.bcms_mobile_cache_directory = File.join(Rails.root, 'public', 'cache' 'mobile')
config.browsercms_cache_directory = File.join(Rails.root, 'public', 'cache', 'full')

Just like in the production.rb file. Once this is added, and you restart the app, it works fine.

Metadata

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