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

Rails 6 load fail with 1.13.1 #377

Open
itsterry opened this issue Dec 22, 2019 · 8 comments
Open

Rails 6 load fail with 1.13.1 #377

itsterry opened this issue Dec 22, 2019 · 8 comments
Assignees

Comments

@itsterry
Copy link

itsterry commented Dec 22, 2019

Hi there

Upgraded to 1.13.1 and get the following error on Puma boot with Rails 6.0.2.1
/Users/terry/.rvm/gems/ruby-2.6.3/gems/cloudinary-1.13.1/lib/cloudinary/helper.rb:358:in '<top (required)>': Cannot load 'Rails.config.active_storage.service': (NameError)

Reverting to 1.11.1 solves the issue.

Stack trace below.

Do let me know what else would be useful to give you

rails s
rails=> Booting Puma
=> Rails 6.0.2.1 application starting in development 
=> Run `rails server --help` for more startup options
Exiting
Traceback (most recent call last):
	71: from bin/rails:4:in `<main>'
	70: from bin/rails:4:in `require'
	69: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands.rb:18:in `<top (required)>'
	68: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/command.rb:46:in `invoke'
	67: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/command/base.rb:69:in `perform'
	66: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
	65: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
	64: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
	63: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in `perform'
	62: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in `tap'
	61: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:147:in `block in perform'
	60: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:37:in `start'
	59: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:77:in `log_to_stdout'
	58: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/server.rb:354:in `wrapped_app'
	57: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/server.rb:219:in `app'
	56: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/server.rb:319:in `build_app_and_options_from_config'
	55: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:40:in `parse_file'
	54: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:49:in `new_from_string'
	53: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:49:in `eval'
	52: from config.ru:in `<main>'
	51: from config.ru:in `new'
	50: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:55:in `initialize'
	49: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:55:in `instance_eval'
	48: from config.ru:5:in `block in <main>'
	47: from config.ru:5:in `require_relative'
	46: from /Users/terry/sites/fanco/config/environment.rb:5:in `<top (required)>'
	45: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/application.rb:363:in `initialize!'
	44: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/initializable.rb:60:in `run_initializers'
	43: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each'
	42: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each'
	41: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component'
	40: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `call'
	39: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `each'
	38: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component'
	37: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from'
	36: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
	35: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each'
	34: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
	33: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/initializable.rb:32:in `run'
	32: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/initializable.rb:32:in `instance_exec'
	31: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/application/finisher.rb:122:in `block in <module:Finisher>'
	30: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:449:in `eager_load_all'
	29: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:449:in `each'
	28: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:338:in `eager_load'
	27: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:338:in `synchronize'
	26: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:346:in `block in eager_load'
	25: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:682:in `ls'
	24: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:682:in `foreach'
	23: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:685:in `block in ls'
	22: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:351:in `block (2 levels) in eager_load'
	21: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:351:in `const_get'
	20: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:16:in `require'
	19: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:16:in `require'
	18: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/app/models/active_storage/blob.rb:291:in `<top (required)>'
	17: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
	16: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:51:in `each'
	15: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
	14: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
	13: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
	12: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:72:in `block in execute_hook'
	11: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:72:in `class_eval'
	10: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/engine.rb:120:in `block (2 levels) in <class:Engine>'
	 9: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/service.rb:49:in `configure'
	 8: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/service/configurator.rb:8:in `build'
	 7: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/service/configurator.rb:17:in `build'
	 6: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/service/configurator.rb:28:in `resolve'
	 5: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
	 4: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
	 3: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/cloudinary-1.13.1/lib/active_storage/service/cloudinary_service.rb:2:in `<top (required)>'
	 2: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
	 1: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
/Users/terry/.rvm/gems/ruby-2.6.3/gems/cloudinary-1.13.1/lib/cloudinary/helper.rb:358:in `<top (required)>': uninitialized constant Cloudinary (NameError)
Did you mean?  CloudinaryHelper
	71: from bin/rails:4:in `<main>'
	70: from bin/rails:4:in `require'
	69: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands.rb:18:in `<top (required)>'
	68: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/command.rb:46:in `invoke'
	67: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/command/base.rb:69:in `perform'
	66: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
	65: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
	64: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
	63: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in `perform'
	62: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in `tap'
	61: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:147:in `block in perform'
	60: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:37:in `start'
	59: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:77:in `log_to_stdout'
	58: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/server.rb:354:in `wrapped_app'
	57: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/server.rb:219:in `app'
	56: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/server.rb:319:in `build_app_and_options_from_config'
	55: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:40:in `parse_file'
	54: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:49:in `new_from_string'
	53: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:49:in `eval'
	52: from config.ru:in `<main>'
	51: from config.ru:in `new'
	50: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:55:in `initialize'
	49: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:55:in `instance_eval'
	48: from config.ru:5:in `block in <main>'
	47: from config.ru:5:in `require_relative'
	46: from /Users/terry/sites/fanco/config/environment.rb:5:in `<top (required)>'
	45: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/application.rb:363:in `initialize!'
	44: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/initializable.rb:60:in `run_initializers'
	43: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each'
	42: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each'
	41: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component'
	40: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `call'
	39: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `each'
	38: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component'
	37: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from'
	36: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
	35: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each'
	34: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
	33: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/initializable.rb:32:in `run'
	32: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/initializable.rb:32:in `instance_exec'
	31: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/application/finisher.rb:122:in `block in <module:Finisher>'
	30: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:449:in `eager_load_all'
	29: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:449:in `each'
	28: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:338:in `eager_load'
	27: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:338:in `synchronize'
	26: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:346:in `block in eager_load'
	25: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:682:in `ls'
	24: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:682:in `foreach'
	23: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:685:in `block in ls'
	22: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:351:in `block (2 levels) in eager_load'
	21: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:351:in `const_get'
	20: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:16:in `require'
	19: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:16:in `require'
	18: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/app/models/active_storage/blob.rb:291:in `<top (required)>'
	17: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
	16: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:51:in `each'
	15: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
	14: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
	13: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
	12: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:72:in `block in execute_hook'
	11: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:72:in `class_eval'
	10: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/engine.rb:120:in `block (2 levels) in <class:Engine>'
	 9: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/service.rb:49:in `configure'
	 8: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/service/configurator.rb:8:in `build'
	 7: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/service/configurator.rb:17:in `build'
	 6: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/service/configurator.rb:28:in `resolve'
	 5: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
	 4: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
	 3: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/cloudinary-1.13.1/lib/active_storage/service/cloudinary_service.rb:2:in `<top (required)>'
	 2: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
	 1: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
/Users/terry/.rvm/gems/ruby-2.6.3/gems/cloudinary-1.13.1/lib/cloudinary/helper.rb:358:in `<top (required)>': Cannot load `Rails.config.active_storage.service`: (NameError)
uninitialized constant Cloudinary
Did you mean?  CloudinaryHelper
@aleksandar-cloudinary
Copy link
Contributor

Hi @itsterry. Thanks for reporting this. Let me set up an environment similar to yours so that I can reproduce this.

@aleksandar-cloudinary aleksandar-cloudinary self-assigned this Dec 23, 2019
@itsterry
Copy link
Author

Here are my Gemfile and Gemfile.lock (NB: I had to add .txt to the filenames so Github would accept them)

Gemfile.lock.txt
Gemfile.txt

@aleksandar-cloudinary
Copy link
Contributor

Thanks for providing that @itsterry. I see you're using the external activestorage-cloudinary-service and I suspect it clashing with the native ActiveStorage support that was added by Cloudinary with the gem in version 1.12.0+ onwards. That would explain why when downgrading to 1.11.* it works as that gem version didn't have ActiveStorage support yet.

Would you be able to test this by upgrading to 1.13.1, temporary removing the external active storage gem and using the native one as part of the newer gem version; does that work? You can find the Cloudinary gem ActiveStorage documentation here - https://cloudinary.com/documentation/rails_activestorage

@itsterry
Copy link
Author

itsterry commented Jan 2, 2020

Hi @aleksandar-cloudinary

Upgrading to 1.13.1 without removing activestorage-cloudinary-service - breaks (as expected - just verifying)

Upgrading to 1.13.1 having removed activestorage-cloudinary-service - also breaks (Stack Trace below)

Verifying that the activestorage-cloudinary-service gem has gone:

cat Gemfile.lock | grep cloudinary

    cloudinary (1.13.1)
  cloudinary (= 1.13.1)

Verifying that we have activestorage in there:

cat Gemfile.lock | grep storage
         activestorage (= 6.0.2.1)
      activestorage (= 6.0.2.1)
    activestorage (6.0.2.1)
      activestorage (= 6.0.2.1)

Running Puma with ( config.eager_load = true )...

rails s
rails=> Booting Puma
=> Rails 6.0.2.1 application starting in development 
=> Run `rails server --help` for more startup options
Exiting
Traceback (most recent call last):
	71: from bin/rails:4:in `<main>'
	70: from bin/rails:4:in `require'
	69: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands.rb:18:in `<top (required)>'
	68: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/command.rb:46:in `invoke'
	67: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/command/base.rb:69:in `perform'
	66: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
	65: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
	64: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
	63: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in `perform'
	62: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in `tap'
	61: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:147:in `block in perform'
	60: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:37:in `start'
	59: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:77:in `log_to_stdout'
	58: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/server.rb:354:in `wrapped_app'
	57: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/server.rb:219:in `app'
	56: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/server.rb:319:in `build_app_and_options_from_config'
	55: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:40:in `parse_file'
	54: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:49:in `new_from_string'
	53: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:49:in `eval'
	52: from config.ru:in `<main>'
	51: from config.ru:in `new'
	50: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:55:in `initialize'
	49: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:55:in `instance_eval'
	48: from config.ru:5:in `block in <main>'
	47: from config.ru:5:in `require_relative'
	46: from /Users/terry/sites/fanco/config/environment.rb:5:in `<top (required)>'
	45: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/application.rb:363:in `initialize!'
	44: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/initializable.rb:60:in `run_initializers'
	43: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each'
	42: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each'
	41: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component'
	40: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `call'
	39: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `each'
	38: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component'
	37: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from'
	36: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
	35: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each'
	34: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
	33: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/initializable.rb:32:in `run'
	32: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/initializable.rb:32:in `instance_exec'
	31: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/application/finisher.rb:122:in `block in <module:Finisher>'
	30: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:449:in `eager_load_all'
	29: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:449:in `each'
	28: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:338:in `eager_load'
	27: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:338:in `synchronize'
	26: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:346:in `block in eager_load'
	25: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:682:in `ls'
	24: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:682:in `foreach'
	23: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:685:in `block in ls'
	22: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:351:in `block (2 levels) in eager_load'
	21: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:351:in `const_get'
	20: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:16:in `require'
	19: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:16:in `require'
	18: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/app/models/active_storage/blob.rb:291:in `<top (required)>'
	17: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
	16: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:51:in `each'
	15: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
	14: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
	13: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
	12: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:72:in `block in execute_hook'
	11: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:72:in `class_eval'
	10: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/engine.rb:120:in `block (2 levels) in <class:Engine>'
	 9: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/service.rb:49:in `configure'
	 8: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/service/configurator.rb:8:in `build'
	 7: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/service/configurator.rb:17:in `build'
	 6: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/service/configurator.rb:28:in `resolve'
	 5: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
	 4: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
	 3: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/cloudinary-1.13.1/lib/active_storage/service/cloudinary_service.rb:2:in `<top (required)>'
	 2: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
	 1: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
/Users/terry/.rvm/gems/ruby-2.6.3/gems/cloudinary-1.13.1/lib/cloudinary/helper.rb:358:in `<top (required)>': uninitialized constant Cloudinary (NameError)
Did you mean?  CloudinaryHelper
	71: from bin/rails:4:in `<main>'
	70: from bin/rails:4:in `require'
	69: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands.rb:18:in `<top (required)>'
	68: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/command.rb:46:in `invoke'
	67: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/command/base.rb:69:in `perform'
	66: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
	65: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
	64: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
	63: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in `perform'
	62: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in `tap'
	61: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:147:in `block in perform'
	60: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:37:in `start'
	59: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:77:in `log_to_stdout'
	58: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/server.rb:354:in `wrapped_app'
	57: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/server.rb:219:in `app'
	56: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/server.rb:319:in `build_app_and_options_from_config'
	55: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:40:in `parse_file'
	54: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:49:in `new_from_string'
	53: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:49:in `eval'
	52: from config.ru:in `<main>'
	51: from config.ru:in `new'
	50: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:55:in `initialize'
	49: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:55:in `instance_eval'
	48: from config.ru:5:in `block in <main>'
	47: from config.ru:5:in `require_relative'
	46: from /Users/terry/sites/fanco/config/environment.rb:5:in `<top (required)>'
	45: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/application.rb:363:in `initialize!'
=> Booting Puma
=> Rails 6.0.2.1 application starting in development 
=> Run `rails server --help` for more startup options
Exiting
Traceback (most recent call last):
	71: from bin/rails:4:in `<main>'
	70: from bin/rails:4:in `require'
	69: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands.rb:18:in `<top (required)>'
	68: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/command.rb:46:in `invoke'
	67: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/command/base.rb:69:in `perform'
	66: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
	65: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
	64: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
	63: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in `perform'
	62: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in `tap'
	61: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:147:in `block in perform'
	60: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:37:in `start'
	59: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:77:in `log_to_stdout'
	58: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/server.rb:354:in `wrapped_app'
	57: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/server.rb:219:in `app'
	56: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/server.rb:319:in `build_app_and_options_from_config'
	55: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:40:in `parse_file'
	54: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:49:in `new_from_string'
	53: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:49:in `eval'
	52: from config.ru:in `<main>'
	51: from config.ru:in `new'
	50: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:55:in `initialize'
	49: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:55:in `instance_eval'
	48: from config.ru:5:in `block in <main>'
	47: from config.ru:5:in `require_relative'
	46: from /Users/terry/sites/fanco/config/environment.rb:5:in `<top (required)>'
	45: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/application.rb:363:in `initialize!'
	44: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/initializable.rb:60:in `run_initializers'
	43: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each'
	42: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each'
	41: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component'
	40: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `call'
	39: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `each'
	38: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component'
	37: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from'
	36: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
	35: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each'
	34: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
	33: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/initializable.rb:32:in `run'
	32: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/initializable.rb:32:in `instance_exec'
	31: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/application/finisher.rb:122:in `block in <module:Finisher>'
	30: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:449:in `eager_load_all'
	29: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:449:in `each'
	28: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:338:in `eager_load'
	27: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:338:in `synchronize'
	26: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:346:in `block in eager_load'
	25: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:682:in `ls'
	24: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:682:in `foreach'
	23: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:685:in `block in ls'
	22: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:351:in `block (2 levels) in eager_load'
	21: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:351:in `const_get'
	20: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:16:in `require'
	19: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:16:in `require'
	18: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/app/models/active_storage/blob.rb:291:in `<top (required)>'
	17: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
	16: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:51:in `each'
	15: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
	14: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
	13: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
	12: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:72:in `block in execute_hook'
	11: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:72:in `class_eval'
	10: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/engine.rb:120:in `block (2 levels) in <class:Engine>'
	 9: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/service.rb:49:in `configure'
	 8: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/service/configurator.rb:8:in `build'
	 7: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/service/configurator.rb:17:in `build'
	 6: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/service/configurator.rb:28:in `resolve'
	 5: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
	 4: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
	 3: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/cloudinary-1.13.1/lib/active_storage/service/cloudinary_service.rb:2:in `<top (required)>'
	 2: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
	 1: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
/Users/terry/.rvm/gems/ruby-2.6.3/gems/cloudinary-1.13.1/lib/cloudinary/helper.rb:358:in `<top (required)>': uninitialized constant Cloudinary (NameError)
Did you mean?  CloudinaryHelper
	71: from bin/rails:4:in `<main>'
	70: from bin/rails:4:in `require'
	69: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands.rb:18:in `<top (required)>'
	68: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/command.rb:46:in `invoke'
	67: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/command/base.rb:69:in `perform'
	66: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
	65: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
	64: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
	63: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in `perform'
	62: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in `tap'
	61: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:147:in `block in perform'
	60: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:37:in `start'
	59: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:77:in `log_to_stdout'
	58: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/server.rb:354:in `wrapped_app'
	57: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/server.rb:219:in `app'
	56: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/server.rb:319:in `build_app_and_options_from_config'
	55: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:40:in `parse_file'
	54: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:49:in `new_from_string'
	53: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:49:in `eval'
	52: from config.ru:in `<main>'
	51: from config.ru:in `new'
	50: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:55:in `initialize'
	49: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/rack-2.0.8/lib/rack/builder.rb:55:in `instance_eval'
	48: from config.ru:5:in `block in <main>'
	47: from config.ru:5:in `require_relative'
	46: from /Users/terry/sites/fanco/config/environment.rb:5:in `<top (required)>'
	45: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/application.rb:363:in `initialize!'
	44: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/initializable.rb:60:in `run_initializers'
	43: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each'
	42: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each'
	41: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component'
	40: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `call'
	39: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:347:in `each'
	38: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component'
	37: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from'
	36: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
	35: from /Users/terry/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each'
	34: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
	33: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/initializable.rb:32:in `run'
	32: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/initializable.rb:32:in `instance_exec'
	31: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/railties-6.0.2.1/lib/rails/application/finisher.rb:122:in `block in <module:Finisher>'
	30: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:449:in `eager_load_all'
	29: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:449:in `each'
	28: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:338:in `eager_load'
	27: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:338:in `synchronize'
	26: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:346:in `block in eager_load'
	25: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:682:in `ls'
	24: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:682:in `foreach'
	23: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:685:in `block in ls'
	22: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:351:in `block (2 levels) in eager_load'
	21: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:351:in `const_get'
	20: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:16:in `require'
	19: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:16:in `require'
	18: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/app/models/active_storage/blob.rb:291:in `<top (required)>'
	17: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
	16: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:51:in `each'
	15: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
	14: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
	13: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
	12: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:72:in `block in execute_hook'
	11: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:72:in `class_eval'
	10: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/engine.rb:120:in `block (2 levels) in <class:Engine>'
	 9: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/service.rb:49:in `configure'
	 8: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/service/configurator.rb:8:in `build'
	 7: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/service/configurator.rb:17:in `build'
	 6: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/activestorage-6.0.2.1/lib/active_storage/service/configurator.rb:28:in `resolve'
	 5: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
	 4: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
	 3: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/cloudinary-1.13.1/lib/active_storage/service/cloudinary_service.rb:2:in `<top (required)>'
	 2: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
	 1: from /Users/terry/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
/Users/terry/.rvm/gems/ruby-2.6.3/gems/cloudinary-1.13.1/lib/cloudinary/helper.rb:358:in `<top (required)>': Cannot load `Rails.config.active_storage.service`: (NameError)
uninitialized constant Cloudinary
Did you mean?  CloudinaryHelper

Apologies for the long stack trace!!

@aleksandar-cloudinary
Copy link
Contributor

Thanks, @itsterry, appreciate you trying this. One of my colleagues was also trying to reproduce this, but with no avail. To get to the bottom of it quickly without going back and forth too much, I suggest if possible for you to share a minimal working rails app with as few dependencies as possible. We'll then be able to just replace the Cloudinary account credentials and all other config/code can remain so that we can reproduce and find the cause of this.

@jessehanley
Copy link

jessehanley commented Apr 8, 2020

+1 getting this error too, but on a SpreeCommerce (Rails 6) app. Reproduce steps: 1) grab the latest copy of Spree, spin up a new controller, try and run any Cloudinary method in console. Fails.

@aleksandar-cloudinary
Copy link
Contributor

Hi @jessehanley . Thanks for sharing this, I'll try it out with SpreeCommerce. Can you reproduce it without any dependencies apart from this Gem? Also, are you using the Cloudinary as an ActiveStorage service?

@emilosman
Copy link

I solved this issue on Rails 6 by changing the docs recommended:
gem 'cloudinary', require: false
to
gem 'cloudinary', require: true
in the Gemfile.

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

4 participants