slate-studio / openapi-rails

OpenAPI-compliant CRUD interface for Rails models with documentation.
http://www.kra.vc/openapi-rails
MIT License
38 stars 12 forks source link

Undefined method `assets` for Rails::Application::Configuration #11

Open BrunoQuaresma opened 6 years ago

BrunoQuaresma commented 6 years ago

When I try to run rails s this error is displayed:

/home/brunoquaresma/.rvm/gems/ruby-2.5.0/gems/railties-5.1.5/lib/rails/railtie/configuration.rb:95:in `method_missing': undefined method `assets' for #<Rails::Application::Configuration:0x000055e2159dc478> (NoMethodError)
Did you mean?  asset_host
orbjoe commented 4 years ago

Same thing happening with with my config.

Setup:

Error message:

/home/largemarge/.rvm/gems/ruby-2.6.2/gems/railties-5.2.4.1/lib/rails/railtie/configuration.rb:97:in `method_missing': undefined method `assets' for #<Rails::Application::Configuration:0x0000557756d08f68>
Did you mean?  asset_host (NoMethodError)
    from /home/largemarge/.rvm/gems/ruby-2.6.2/gems/openapi-rails-0.4.0/lib/openapi/engine.rb:4:in `block in <class:Engine>'
    from /home/largemarge/.rvm/gems/ruby-2.6.2/gems/railties-5.2.4.1/lib/rails/initializable.rb:32:in `instance_exec'
    from /home/largemarge/.rvm/gems/ruby-2.6.2/gems/railties-5.2.4.1/lib/rails/initializable.rb:32:in `run'
    from /home/largemarge/.rvm/gems/ruby-2.6.2/gems/railties-5.2.4.1/lib/rails/initializable.rb:61:in `block in run_initializers'
    from /usr/share/rvm/rubies/ruby-2.6.2/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each'
    from /usr/share/rvm/rubies/ruby-2.6.2/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
    from /usr/share/rvm/rubies/ruby-2.6.2/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from'
    from /usr/share/rvm/rubies/ruby-2.6.2/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component'
    from /usr/share/rvm/rubies/ruby-2.6.2/lib/ruby/2.6.0/tsort.rb:347:in `each'
    from /usr/share/rvm/rubies/ruby-2.6.2/lib/ruby/2.6.0/tsort.rb:347:in `call'
    from /usr/share/rvm/rubies/ruby-2.6.2/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component'
    from /usr/share/rvm/rubies/ruby-2.6.2/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each'
    from /usr/share/rvm/rubies/ruby-2.6.2/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each'
    from /home/largemarge/.rvm/gems/ruby-2.6.2/gems/railties-5.2.4.1/lib/rails/initializable.rb:60:in `run_initializers'
    from /home/largemarge/.rvm/gems/ruby-2.6.2/gems/railties-5.2.4.1/lib/rails/application.rb:361:in `initialize!'
    from /src/blastingcapinc/config/environment.rb:5:in `<main>'
    from /home/largemarge/.rvm/gems/ruby-2.6.2/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
    from /home/largemarge/.rvm/gems/ruby-2.6.2/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
    from /home/largemarge/.rvm/gems/ruby-2.6.2/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
    from /home/largemarge/.rvm/gems/ruby-2.6.2/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
    from /home/largemarge/.rvm/gems/ruby-2.6.2/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
    from /home/largemarge/.rvm/gems/ruby-2.6.2/gems/activesupport-5.2.4.1/lib/active_support/dependencies.rb:291:in `block in require'
    from /home/largemarge/.rvm/gems/ruby-2.6.2/gems/activesupport-5.2.4.1/lib/active_support/dependencies.rb:257:in `load_dependency'
    from /home/largemarge/.rvm/gems/ruby-2.6.2/gems/activesupport-5.2.4.1/lib/active_support/dependencies.rb:291:in `require'
    from /home/largemarge/.rvm/gems/ruby-2.6.2/gems/spring-2.1.0/lib/spring/application.rb:106:in `preload'
    from /home/largemarge/.rvm/gems/ruby-2.6.2/gems/spring-2.1.0/lib/spring/application.rb:157:in `serve'
    from /home/largemarge/.rvm/gems/ruby-2.6.2/gems/spring-2.1.0/lib/spring/application.rb:145:in `block in run'
    from /home/largemarge/.rvm/gems/ruby-2.6.2/gems/spring-2.1.0/lib/spring/application.rb:139:in `loop'
    from /home/largemarge/.rvm/gems/ruby-2.6.2/gems/spring-2.1.0/lib/spring/application.rb:139:in `run'
    from /home/largemarge/.rvm/gems/ruby-2.6.2/gems/spring-2.1.0/lib/spring/application/boot.rb:19:in `<top (required)>'
    from /usr/share/rvm/rubies/ruby-2.6.2/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/share/rvm/rubies/ruby-2.6.2/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from -e:1:in `<main>'

Steps to Reproduce

  1. Use Ruby 2.6.5 via RVM: rvm use 2.6.5
  2. Create a new Rails project: rails new MyProject --api
  3. Launch the project: bundle exec rails s -e development
  4. Close the project
  5. Add the openapi-rails Gem to the Gemfile
  6. Install in Bundler: bundle install
  7. Attempt to relaunch the project: bundle exec rails s -e development
  8. Error will appear in the console