Deploying an app on Heroku


#1

Hi, guys. I’m trying to deploy my app for almost three hours but it seems that I’m stuck…
When I run heroku run rails console I get

`76: from /app/bin/rails:9:in `<main>'
    75: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
    74: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
    73: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
    72: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
    71: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
    70: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
    69: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
    68: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
    67: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/commands.rb:18:in `<main>'
    66: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/command.rb:46:in `invoke'
    65: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/command/base.rb:65:in `perform'
    64: from /app/vendor/bundle/ruby/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
    63: from /app/vendor/bundle/ruby/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
    62: from /app/vendor/bundle/ruby/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
    61: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/commands/console/console_command.rb:95:in `perform'
    60: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/command/actions.rb:18:in `require_application_and_environment!'
    59: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/application.rb:337:in `require_environment!'
    58: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
    57: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
    56: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
    55: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
    54: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
    53: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
    52: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
    51: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
    50: from /app/config/environment.rb:5:in `<main>'
    49: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/application.rb:361:in `initialize!'
    48: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:60:in `run_initializers'
    47: from /app/vendor/ruby-2.5.3/lib/ruby/2.5.0/tsort.rb:205:in `tsort_each'
    46: from /app/vendor/ruby-2.5.3/lib/ruby/2.5.0/tsort.rb:226:in `tsort_each'
    45: from /app/vendor/ruby-2.5.3/lib/ruby/2.5.0/tsort.rb:347:in `each_strongly_connected_component'
    44: from /app/vendor/ruby-2.5.3/lib/ruby/2.5.0/tsort.rb:347:in `call'
    43: from /app/vendor/ruby-2.5.3/lib/ruby/2.5.0/tsort.rb:347:in `each'
    42: from /app/vendor/ruby-2.5.3/lib/ruby/2.5.0/tsort.rb:349:in `block in each_strongly_connected_component'
    41: from /app/vendor/ruby-2.5.3/lib/ruby/2.5.0/tsort.rb:431:in `each_strongly_connected_component_from'
    40: from /app/vendor/ruby-2.5.3/lib/ruby/2.5.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
    39: from /app/vendor/ruby-2.5.3/lib/ruby/2.5.0/tsort.rb:228:in `block in tsort_each'
    38: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:61:in `block in run_initializers'
    37: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:32:in `run'
    36: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:32:in `instance_exec'
    35: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
    34: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/application/finisher.rb:69:in `each'
    33: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/engine.rb:356:in `eager_load!'
    32: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/engine.rb:475:in `eager_load!'
    31: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/engine.rb:475:in `each'
    30: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/engine.rb:477:in `block in eager_load!'
    29: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/engine.rb:477:in `each'
    28: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/engine.rb:478:in `block (2 levels) in eager_load!'
    27: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:246:in `require_dependency'
    26: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:80:in `depend_on'
    25: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:334:in `depend_on'
    24: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:45:in `require_or_load'
    23: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:16:in `allow_bootsnap_retry'
    22: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:46:in `block in require_or_load'
    21: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:356:in `require_or_load'
    20: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:37:in `load_interlock'
    19: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies/interlock.rb:13:in `loading'
    18: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/concurrency/share_lock.rb:151:in `exclusive'
    17: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies/interlock.rb:14:in `block in loading'
    16: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:37:in `block in load_interlock'
    15: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:378:in `block in require_or_load'
    14: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
    13: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
    12: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
    11: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
    10: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
     9: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
     8: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
     7: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
     6: from /app/vendor/bundle/ruby/2.5.0/gems/activestorage-5.2.2/app/models/active_storage/blob.rb:16:in `<main>'
     5: from /app/vendor/bundle/ruby/2.5.0/gems/activestorage-5.2.2/app/models/active_storage/blob.rb:23:in `<class:Blob>'
     4: from /app/vendor/bundle/ruby/2.5.0/gems/activestorage-5.2.2/app/models/active_storage/blob.rb:23:in `include'
     3: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/concern.rb:122:in `append_features'
     2: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/concern.rb:122:in `class_eval'
     1: from /app/vendor/bundle/ruby/2.5.0/gems/activestorage-5.2.2/app/models/active_storage/blob/representable.rb:7:in block in <module:Representable>

/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/dynamic_matchers.rb:22:in 'method_missing': undefined methodhas_one_attached’ for #Class:0x000055649efc4a88 (NoMethodError)`

here is my code https://github.com/Tommyisr/blogger_test


#2

Hi @Tommyisr

I assume the issue doesn’t happen locally?


#3

Yep, locally everything is fine


#4

This looks like a heroku issue then. It’s coming out of active storage which was introduced in rails 5.2. It may be because it knows you are using a storage solution.

I think this will be quite complicated to fix. If it works locally then I’d move on for now.


#5

It’s just making me crazy that I have unfinished project in curriculum, but on the other side I dont know yet rails to fix this issue and this is not my fault.
So yeah, I’m just moving on :slight_smile: