Giter Club home page Giter Club logo

Comments (3)

TrevorBramble avatar TrevorBramble commented on August 10, 2024

@davidstocker Does your initializer (config/initializers/contentful_rails.rb) look like the README example? It looks like you may have added ContentfulRails.configuration do |config| instead of ContentfulRails.configure do |config|.

from contentful_rails.

davidstocker avatar davidstocker commented on August 10, 2024

I didn't preserve the initializer that I used when I first posted the issue since we decided to go another direction. However, I just now copied the initializer from the readme and still failed to load the application.

ContentfulRails.configure do |config|
  config.authenticate_webhooks = true # false here would allow the webhooks to process without basic auth
  config.webhooks_username = "a basic auth username"
  config.webhooks_password = "a basic auth password"
end

Here is the stack trace with this initializer:

=> Booting WEBrick
=> Rails 4.1.8 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
Exiting
/Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/contentful_rails-0.2.2.1/lib/contentful_rails/engine.rb:7:in `block in <class:Engine>': undefined method `configuration' for ContentfulRails:Module (NoMethodError)
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:36:in `call'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:44:in `each'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/railties-4.1.8/lib/rails/application/bootstrap.rb:76:in `block in <module:Bootstrap>'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/railties-4.1.8/lib/rails/initializable.rb:30:in `instance_exec'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/railties-4.1.8/lib/rails/initializable.rb:30:in `run'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/railties-4.1.8/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /Users/r626356/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
    from /Users/r626356/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
    from /Users/r626356/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
    from /Users/r626356/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
    from /Users/r626356/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each'
    from /Users/r626356/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `call'
    from /Users/r626356/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
    from /Users/r626356/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
    from /Users/r626356/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/railties-4.1.8/lib/rails/initializable.rb:54:in `run_initializers'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/railties-4.1.8/lib/rails/application.rb:300:in `initialize!'
    from /Users/r626356/workspace/swh-store/config/environment.rb:5:in `<top (required)>'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `block in require'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:232:in `load_dependency'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
    from /Users/r626356/workspace/swh-store/config.ru:3:in `block in <main>'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/rack-1.5.5/lib/rack/builder.rb:55:in `instance_eval'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/rack-1.5.5/lib/rack/builder.rb:55:in `initialize'
    from /Users/r626356/workspace/swh-store/config.ru:in `new'
    from /Users/r626356/workspace/swh-store/config.ru:in `<main>'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/rack-1.5.5/lib/rack/builder.rb:49:in `eval'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/rack-1.5.5/lib/rack/builder.rb:49:in `new_from_string'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/rack-1.5.5/lib/rack/builder.rb:40:in `parse_file'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/rack-1.5.5/lib/rack/server.rb:277:in `build_app_and_options_from_config'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/rack-1.5.5/lib/rack/server.rb:199:in `app'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/railties-4.1.8/lib/rails/commands/server.rb:50:in `app'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/rack-1.5.5/lib/rack/server.rb:314:in `wrapped_app'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/railties-4.1.8/lib/rails/commands/server.rb:130:in `log_to_stdout'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/railties-4.1.8/lib/rails/commands/server.rb:67:in `start'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:81:in `block in server'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:in `tap'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:in `server'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
    from /Users/r626356/.rvm/gems/ruby-2.2.1@swh-store/gems/railties-4.1.8/lib/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:8:in `require'
    from bin/rails:8:in `<main>'

from contentful_rails.

edtjones avatar edtjones commented on August 10, 2024

hi @davidstocker sorry for the slow reply. I think this relates to #7 which I've just resolved. Can you have a nose at the README for contentful_rails and see if it makes sense / works for you?

from contentful_rails.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.