Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rail 6 API - uninitialized constant ActionController::Responder (NameError) #138

Open
rusikf opened this issue Apr 11, 2020 · 2 comments
Open

Comments

@rusikf
Copy link

rusikf commented Apr 11, 2020

Hi guys, when I run

rails g representer Post

On rails 6 api app
I receive

/home/rusikf/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/active_support.rb:80:in block in load_missing_con stant': uninitialized constant ActionController::Responder (NameError) from /home/rusikf/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/active_support.rb:9:in without_boots
nap_cache'
from /home/rusikf/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/active_support.rb:80:in rescue in lo ad_missing_constant' from /home/rusikf/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/active_support.rb:59:in load_missing
_constant'
from /home/rusikf/.rvm/gems/ruby-2.6.4/gems/roar-rails-1.1.0/lib/roar/rails/rails4_0_strategy.rb:2:in <module:Rails>' from /home/rusikf/.rvm/gems/ruby-2.6.4/gems/roar-rails-1.1.0/lib/roar/rails/rails4_0_strategy.rb:1:in

'

I included in Gemfile: roar-rails, responders, multi_json gems

How to fix it ? Is it possible to add readme note about it?
Also, this gem requires gem 'multi_json', is it possible to add note to README?

@and0x000
Copy link

This is due to the gem not having a strategy for Rails 6.

The most recent version supported is rails 5.1. See: https://github.com/apotonick/roar-rails/blob/master/lib/roar-rails.rb#L38

The gem looks pretty much abandoned, as some other pull requests, that would support at least rails 5.2 were not merged.

See #139

@apotonick
Copy link
Member

@and0x000 Please send a PR for a Rails 6 strategy. 🍻 We can discuss whether or not we want to support the responder logic.

Roar-rails is slowly superseded by Trailblazer's endpoints, or people do rendering manually in operations, so there was less interest in this particular glue gem.

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

No branches or pull requests

3 participants