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

undefined method `red' for " ZRO":String #15

Closed
johnvuko opened this issue Apr 2, 2018 · 3 comments
Closed

undefined method `red' for " ZRO":String #15

johnvuko opened this issue Apr 2, 2018 · 3 comments

Comments

@johnvuko
Copy link

johnvuko commented Apr 2, 2018

Hi,
I just created a rails 5.2 (rc2) application and added your gem and I have the following error in a empty controller:

undefined method `red' for " ZRO":String
Rails.root: /app

Application Trace | Framework Trace | Full Trace
zero-rails_openapi (1.5.6) lib/open_api/dsl.rb:39:in `api'
app/controllers/api/houseworks_controller.rb:5:in `<class:HouseworksController>'
app/controllers/api/houseworks_controller.rb:3:in `<main>'
bootsnap (1.2.1) lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:84:in `load'
bootsnap (1.2.1) lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:84:in `load'

Here my controllers:

require 'open_api/dsl'

class Api::ApiController < ActionController::API
  include OpenApi::DSL
end
class Api::HouseworksController < Api::ApiController
  api :index, 'GET list' do
  end
end

This is can fix if I add require 'colorize' in my HouseworksController.
I think you can avoid this by set the require in your lib.

zhandao pushed a commit that referenced this issue Apr 2, 2018
@zhandao
Copy link
Owner

zhandao commented Apr 2, 2018

Hi,
I tried to require colorize. Could you install the latest version from GitHub, and test this problem?
gem 'zero-rails_openapi', github: 'zhandao/zero-rails_openapi'

@johnvuko
Copy link
Author

johnvuko commented Apr 2, 2018

Yes it works.
Thanks

@johnvuko johnvuko closed this as completed Apr 2, 2018
@zhandao
Copy link
Owner

zhandao commented Apr 2, 2018

You are welcome.

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

2 participants