I've been suffering from this issue for a rather long time and have mostly put up with it but I can't anymore. I have tried to look for a solution to no avail.
Whenever I try to perform a ruby/rails call from my terminal, I am missing the first line of any error output.
As you can see in the example below, the first line, which includes the actual error message, is missing.
For more info:
I am running Ubuntu 20.04 with a zsh/oh-my-zsh shell, but this also happens in bash. This has been happening for several versions of ruby now.
Example:
➜ CODE_BASE git:(branch_name) ✗ rails routes
Traceback (most recent call last):
42: from bin/rails:9:in `<main>'
41: from bin/rails:9:in `require'
40: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/railties-6.1.4.1/lib/rails/commands.rb:18:in `<top (required)>'
39: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/railties-6.1.4.1/lib/rails/command.rb:48:in `invoke'
38: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/railties-6.1.4.1/lib/rails/command/base.rb:69:in `perform'
37: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
36: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
35: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
34: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/railties-6.1.4.1/lib/rails/commands/routes/routes_command.rb:13:in `perform'
33: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/railties-6.1.4.1/lib/rails/command/actions.rb:15:in `require_application_and_environment!'
32: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/railties-6.1.4.1/lib/rails/command/actions.rb:28:in `require_environment!'
31: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/railties-6.1.4.1/lib/rails/application.rb:367:in `require_environment!'
30: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `require'
29: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:299:in `load_dependency'
28: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `block in require'
27: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `require'
26: from /home/penguin/Projects/CODE_BASE/config/environment.rb:5:in `<top (required)>'
25: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/railties-6.1.4.1/lib/rails/application.rb:391:in `initialize!'
24: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/railties-6.1.4.1/lib/rails/initializable.rb:60:in `run_initializers'
23: from /usr/share/rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/tsort.rb:205:in `tsort_each'
22: from /usr/share/rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/tsort.rb:226:in `tsort_each'
21: from /usr/share/rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/tsort.rb:347:in `each_strongly_connected_component'
20: from /usr/share/rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/tsort.rb:347:in `call'
19: from /usr/share/rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/tsort.rb:347:in `each'
18: from /usr/share/rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/tsort.rb:349:in `block in each_strongly_connected_component'
17: from /usr/share/rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/tsort.rb:431:in `each_strongly_connected_component_from'
16: from /usr/share/rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
15: from /usr/share/rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/tsort.rb:228:in `block in tsort_each'
14: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/railties-6.1.4.1/lib/rails/initializable.rb:61:in `block in run_initializers'
13: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/railties-6.1.4.1/lib/rails/initializable.rb:32:in `run'
12: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/railties-6.1.4.1/lib/rails/initializable.rb:32:in `instance_exec'
11: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/railties-6.1.4.1/lib/rails/application/finisher.rb:195:in `block in <module:Finisher>'
10: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/railties-6.1.4.1/lib/rails/application/routes_reloader.rb:10:in `execute'
9: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/activesupport-6.1.4.1/lib/active_support/file_update_checker.rb:83:in `execute'
8: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/railties-6.1.4.1/lib/rails/application/routes_reloader.rb:35:in `block in updater'
7: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/railties-6.1.4.1/lib/rails/application/routes_reloader.rb:21:in `reload!'
6: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/railties-6.1.4.1/lib/rails/application/routes_reloader.rb:47:in `load_paths'
5: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/railties-6.1.4.1/lib/rails/application/routes_reloader.rb:47:in `each'
4: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/railties-6.1.4.1/lib/rails/application/routes_reloader.rb:47:in `block in load_paths'
3: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:326:in `load'
2: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:299:in `load_dependency'
1: from /home/penguin/.rvm/gems/ruby-2.7.6/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:326:in `block in load'
/home/penguin/.rvm/gems/ruby-2.7.6/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:326:in `load':
Related
I need to customize few state machines' behaviour for our business requirement and followed the documentation for the solidus recommended way of replacing an existing state machine. However, I am not being able to do so this way. Do I have to do something extra besides the fact mentioned in the documentation ? I can also think of an alternative way of clearing out existing states and events for the models and redefining the state machines required in the models themselves. However, I prefer to go with this way if possible.
Here, the application traceback for the issue.
DEPRECATION WARNING: Devise::Models::Authenticatable::BLACKLIST_FOR_SERIALIZATION is deprecated! Use Devise::Models::Authenticatable::UNSAFE_ATTRIBUTES_FOR_SERIALIZATION instead. (called from <main> at /home/sis/Bajra/adguru/config/application.rb:27)
=> Booting Puma
=> Rails 6.0.3.7 application starting in development
=> Run `rails server --help` for more startup options
Exiting
Traceback (most recent call last):
69: from bin/rails:3:in `<main>'
68: from bin/rails:3:in `load'
67: from /home/sis/Bajra/adguru/bin/spring:15:in `<top (required)>'
66: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
65: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
64: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<top (required)>'
63: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `load'
62: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/spring-2.1.1/bin/spring:49:in `<top (required)>'
61: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/spring-2.1.1/lib/spring/client.rb:30:in `run'
60: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/spring-2.1.1/lib/spring/client/command.rb:7:in `call'
59: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `call'
58: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `load'
57: from /home/sis/Bajra/adguru/bin/rails:9:in `<top (required)>'
56: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
55: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
54: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.3.7/lib/rails/commands.rb:18:in `<main>'
53: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.3.7/lib/rails/command.rb:46:in `invoke'
52: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.3.7/lib/rails/command/base.rb:69:in `perform'
51: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
50: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
49: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
48: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.3.7/lib/rails/commands/server/server_command.rb:138:in `perform'
47: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.3.7/lib/rails/commands/server/server_command.rb:138:in `tap'
46: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.3.7/lib/rails/commands/server/server_command.rb:147:in `block in perform'
45: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.3.7/lib/rails/commands/server/server_command.rb:37:in `start'
44: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.3.7/lib/rails/commands/server/server_command.rb:77:in `log_to_stdout'
43: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rack-2.2.3/lib/rack/server.rb:422:in `wrapped_app'
42: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rack-2.2.3/lib/rack/server.rb:249:in `app'
41: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rack-2.2.3/lib/rack/server.rb:349:in `build_app_and_options_from_config'
40: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
39: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
38: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
37: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
36: from config.ru:5:in `block in <main>'
35: from config.ru:5:in `require_relative'
34: from /home/sis/Bajra/adguru/config/environment.rb:7:in `<main>'
33: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.3.7/lib/rails/application.rb:363:in `initialize!'
32: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.3.7/lib/rails/initializable.rb:60:in `run_initializers'
31: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each'
30: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each'
29: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component'
28: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/2.6.0/tsort.rb:347:in `call'
27: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/2.6.0/tsort.rb:347:in `each'
26: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component'
25: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/2.6.0/tsort.rb:415:in `each_strongly_connected_component_from'
24: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/2.6.0/tsort.rb:415:in `call'
23: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.3.7/lib/rails/initializable.rb:50:in `tsort_each_child'
22: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.3.7/lib/rails/initializable.rb:50:in `each'
21: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/2.6.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
20: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from'
19: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/2.6.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
18: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
17: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each'
16: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.3.7/lib/rails/initializable.rb:61:in `block in run_initializers'
15: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.3.7/lib/rails/initializable.rb:32:in `run'
14: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.3.7/lib/rails/initializable.rb:32:in `instance_exec'
13: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.3.7/lib/rails/engine.rb:624:in `block in <class:Engine>'
12: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.3.7/lib/rails/engine.rb:624:in `each'
11: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.3.7/lib/rails/engine.rb:625:in `block (2 levels) in <class:Engine>'
10: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.3.7/lib/rails/engine.rb:665:in `load_config_initializer'
9: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.7/lib/active_support/notifications.rb:182:in `instrument'
8: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.3.7/lib/rails/engine.rb:666:in `block in load_config_initializer'
7: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.7/lib/active_support/dependencies.rb:318:in `load'
6: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.7/lib/active_support/dependencies.rb:291:in `load_dependency'
5: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.7/lib/active_support/dependencies.rb:318:in `block in load'
4: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:39:in `load'
3: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:39:in `load'
2: from /home/sis/Bajra/adguru/config/initializers/spree.rb:6:in `<main>'
1: from /home/sis/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/solidus_core-2.10.0.beta1/lib/spree/core.rb:45:in `config'
/home/sis/Bajra/adguru/config/initializers/spree.rb:22:in `block in <main>': undefined method `state_machines' for #<Spree::AppConfiguration:0x000055cc946bb3c0> (NoMethodError)
you are using an old version of Solidus. The feature described in the guides you linked, which allows using a different class for your state machines, refers to more recent versions (2.11+ if I recall correctly).
If you want you can still customize your state machines by monkey patching them. For example, to change the Order state machine:
# app/overrides/your_store/order/do_stuff_after_confirm.rb
module YourStore
module Order
module DoStuffAfterConfirm
def self.prepended(base)
base.state_machine.after_transition to: :confirm, do: :your_business!
end
def your_business!
# ...
end
Spree::Order.prepend self
end
end
end
After recently upgrading to Rails 5.2 from 4.2 I am trying to test production but this occurs everytime I start.
Traceback (most recent call last):
55: from script/rails:6:in `<main>'
54: from script/rails:6:in `require'
53: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/railties-5.2.4.3/lib/rails/commands.rb:18:in `<top (required)>'
52: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/railties-5.2.4.3/lib/rails/command.rb:46:in `invoke'
51: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/railties-5.2.4.3/lib/rails/command/base.rb:69:in `perform'
50: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
49: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
48: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
47: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/railties-5.2.4.3/lib/rails/commands/console/console_command.rb:95:in `perform'
46: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/railties-5.2.4.3/lib/rails/command/actions.rb:15:in `require_application_and_environment!'
45: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/railties-5.2.4.3/lib/rails/command/actions.rb:28:in `require_environment!'
44: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/railties-5.2.4.3/lib/rails/application.rb:337:in `require_environment!'
43: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
42: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency'
41: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `block in require'
40: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
39: from /home/deploy/DSM/config/environment.rb:5:in `<top (required)>'
38: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/railties-5.2.4.3/lib/rails/railtie.rb:190:in `method_missing'
37: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/railties-5.2.4.3/lib/rails/railtie.rb:190:in `public_send'
36: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/railties-5.2.4.3/lib/rails/application.rb:361:in `initialize!'
35: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/railties-5.2.4.3/lib/rails/initializable.rb:60:in `run_initializers'
34: from /home/deploy/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:205:in `tsort_each'
33: from /home/deploy/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:226:in `tsort_each'
32: from /home/deploy/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:347:in `each_strongly_connected_component'
31: from /home/deploy/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:347:in `call'
30: from /home/deploy/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:347:in `each'
29: from /home/deploy/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:349:in `block in each_strongly_connected_component'
28: from /home/deploy/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:431:in `each_strongly_connected_component_from'
27: from /home/deploy/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
26: from /home/deploy/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:228:in `block in tsort_each'
25: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/railties-5.2.4.3/lib/rails/initializable.rb:61:in `block in run_initializers'
24: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/railties-5.2.4.3/lib/rails/initializable.rb:32:in `run'
23: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/railties-5.2.4.3/lib/rails/initializable.rb:32:in `instance_exec'
22: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/railties-5.2.4.3/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
21: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/railties-5.2.4.3/lib/rails/application/finisher.rb:69:in `each'
20: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/railties-5.2.4.3/lib/rails/engine.rb:356:in `eager_load!'
19: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/railties-5.2.4.3/lib/rails/engine.rb:475:in `eager_load!'
18: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/railties-5.2.4.3/lib/rails/engine.rb:475:in `each'
17: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/railties-5.2.4.3/lib/rails/engine.rb:477:in `block in eager_load!'
16: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/railties-5.2.4.3/lib/rails/engine.rb:477:in `each'
15: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/railties-5.2.4.3/lib/rails/engine.rb:478:in `block (2 levels) in eager_load!'
14: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:246:in `require_dependency'
13: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:334:in `depend_on'
12: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:356:in `require_or_load'
11: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:37:in `load_interlock'
10: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.4.3/lib/active_support/dependencies/interlock.rb:13:in `loading'
9: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.4.3/lib/active_support/concurrency/share_lock.rb:151:in `exclusive'
8: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.4.3/lib/active_support/dependencies/interlock.rb:14:in `block in loading'
7: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:37:in `block in load_interlock'
6: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:378:in `block in require_or_load'
5: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
4: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency'
3: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `block in require'
2: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
1: from /home/deploy/.rvm/gems/ruby-2.5.1/gems/activestorage-5.2.4.3/app/jobs/active_storage/purge_job.rb:4:in `<top (required)>'
/home/deploy/.rvm/gems/ruby-2.5.1/gems/activestorage-5.2.4.3/app/jobs/active_storage/purge_job.rb:5:in `<class:PurgeJob>': undefined method `discard_on' for ActiveStorage::PurgeJob:Class (NoMethodError)
The following doesn't happen in development/test or with eager_load disabled in production.rb, which makes sense.
I am using rvm (2.5.1, 2.5.0, 2.6.5) tried all three.
rails -v: Rails 5.2.4.3
These are built in methods so I'm not sure best way to TS/resolve.
So I figured it out.
I had attempted to go to rails 6 but there was too much that needed to be changed. In doing so I had activejob_backport-0.0.3 in my rvm gems directory and after removing it, the issue no longer occurred.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
If I make a folder with rails new myproject
then go in the folder and type rails s, I get this error:
Warning: the running version of Bundler (2.1.2) is older than the version that created the lockfile (2.1.4). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.1.4`.
=> Booting Puma
=> Rails 6.0.3.2 application starting in development
=> Run `rails server --help` for more startup options
Exiting
Traceback (most recent call last):
77: from bin/rails:3:in `<main>'
76: from bin/rails:3:in `load'
75: from /home/arian/projects/Arian-p1/bin/spring:15:in `<top (required)>'
74: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
73: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
72: from /var/lib/gems/2.7.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `<top (required)>'
71: from /var/lib/gems/2.7.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `load'
70: from /var/lib/gems/2.7.0/gems/spring-2.1.0/bin/spring:49:in `<top (required)>'
69: from /var/lib/gems/2.7.0/gems/spring-2.1.0/lib/spring/client.rb:30:in `run'
68: from /var/lib/gems/2.7.0/gems/spring-2.1.0/lib/spring/client/command.rb:7:in `call'
67: from /var/lib/gems/2.7.0/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `call'
66: from /var/lib/gems/2.7.0/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `load'
65: from /home/arian/projects/Arian-p1/bin/rails:9:in `<top (required)>'
64: from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `require'
63: from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:291:in `load_dependency'
62: from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `block in require'
61: from /var/lib/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
60: from /var/lib/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
59: from /var/lib/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
58: from /var/lib/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
57: from /var/lib/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
56: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/commands.rb:18:in `<main>'
55: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/command.rb:46:in `invoke'
54: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/command/base.rb:69:in `perform'
53: from /var/lib/gems/2.7.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
52: from /var/lib/gems/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
51: from /var/lib/gems/2.7.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
50: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/commands/server/server_command.rb:138:in `perform'
49: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/commands/server/server_command.rb:138:in `tap'
48: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/commands/server/server_command.rb:147:in `block in perform'
47: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/commands/server/server_command.rb:37:in `start'
46: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/commands/server/server_command.rb:77:in `log_to_stdout'
45: from /var/lib/gems/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:422:in `wrapped_app'
44: from /var/lib/gems/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:249:in `app'
43: from /var/lib/gems/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:349:in `build_app_and_options_from_config'
42: from /var/lib/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
41: from /var/lib/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
40: from /var/lib/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
39: from /var/lib/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
38: from config.ru:3:in `block in <main>'
37: from /var/lib/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:49:in `require_relative'
36: from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `require'
35: from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:291:in `load_dependency'
34: from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `block in require'
33: from /var/lib/gems/2.7.0/gems/zeitwerk-2.4.0/lib/zeitwerk/kernel.rb:34:in `require'
32: from /var/lib/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
31: from /var/lib/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
30: from /var/lib/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
29: from /var/lib/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
28: from /var/lib/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
27: from /home/arian/projects/Arian-p1/config/environment.rb:5:in `<main>'
26: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/application.rb:363:in `initialize!'
25: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:60:in `run_initializers'
24: from /usr/lib/ruby/2.7.0/tsort.rb:205:in `tsort_each'
23: from /usr/lib/ruby/2.7.0/tsort.rb:226:in `tsort_each'
22: from /usr/lib/ruby/2.7.0/tsort.rb:347:in `each_strongly_connected_component'
21: from /usr/lib/ruby/2.7.0/tsort.rb:347:in `call'
20: from /usr/lib/ruby/2.7.0/tsort.rb:347:in `each'
19: from /usr/lib/ruby/2.7.0/tsort.rb:349:in `block in each_strongly_connected_component'
18: from /usr/lib/ruby/2.7.0/tsort.rb:431:in `each_strongly_connected_component_from'
17: from /usr/lib/ruby/2.7.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
16: from /usr/lib/ruby/2.7.0/tsort.rb:228:in `block in tsort_each'
15: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:61:in `block in run_initializers'
14: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:32:in `run'
13: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:32:in `instance_exec'
12: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/railtie.rb:84:in `block in <class:Engine>'
11: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker.rb:35:in `bootstrap'
10: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/commands.rb:25:in `bootstrap'
9: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/manifest.rb:18:in `refresh'
8: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/manifest.rb:83:in `load'
7: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:51:in `public_manifest_path'
6: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:47:in `public_output_path'
5: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:43:in `public_path'
4: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:84:in `fetch'
3: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:88:in `data'
2: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:92:in `load'
1: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:92:in `read'
/var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:92:in `read': No such file or directory # rb_sysopen - /home/arian/projects/Arian-p1/config/webpacker.yml (Errno::ENOENT)
76: from bin/rails:3:in `<main>'
75: from bin/rails:3:in `load'
74: from /home/arian/projects/Arian-p1/bin/spring:15:in `<top (required)>'
73: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
72: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
71: from /var/lib/gems/2.7.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `<top (required)>'
70: from /var/lib/gems/2.7.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `load'
69: from /var/lib/gems/2.7.0/gems/spring-2.1.0/bin/spring:49:in `<top (required)>'
68: from /var/lib/gems/2.7.0/gems/spring-2.1.0/lib/spring/client.rb:30:in `run'
67: from /var/lib/gems/2.7.0/gems/spring-2.1.0/lib/spring/client/command.rb:7:in `call'
66: from /var/lib/gems/2.7.0/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `call'
65: from /var/lib/gems/2.7.0/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `load'
64: from /home/arian/projects/Arian-p1/bin/rails:9:in `<top (required)>'
63: from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `require'
62: from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:291:in `load_dependency'
61: from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `block in require'
60: from /var/lib/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
59: from /var/lib/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
58: from /var/lib/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
57: from /var/lib/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
56: from /var/lib/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
55: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/commands.rb:18:in `<main>'
54: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/command.rb:46:in `invoke'
53: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/command/base.rb:69:in `perform'
52: from /var/lib/gems/2.7.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
51: from /var/lib/gems/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
50: from /var/lib/gems/2.7.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
49: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/commands/server/server_command.rb:138:in `perform'
48: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/commands/server/server_command.rb:138:in `tap'
47: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/commands/server/server_command.rb:147:in `block in perform'
46: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/commands/server/server_command.rb:37:in `start'
45: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/commands/server/server_command.rb:77:in `log_to_stdout'
44: from /var/lib/gems/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:422:in `wrapped_app'
43: from /var/lib/gems/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:249:in `app'
42: from /var/lib/gems/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:349:in `build_app_and_options_from_config'
41: from /var/lib/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
40: from /var/lib/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
39: from /var/lib/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
38: from /var/lib/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
37: from config.ru:3:in `block in <main>'
36: from /var/lib/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:49:in `require_relative'
35: from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `require'
34: from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:291:in `load_dependency'
33: from /var/lib/gems/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `block in require'
32: from /var/lib/gems/2.7.0/gems/zeitwerk-2.4.0/lib/zeitwerk/kernel.rb:34:in `require'
31: from /var/lib/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
30: from /var/lib/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
29: from /var/lib/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
28: from /var/lib/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
27: from /var/lib/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
26: from /home/arian/projects/Arian-p1/config/environment.rb:5:in `<main>'
25: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/application.rb:363:in `initialize!'
24: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:60:in `run_initializers'
23: from /usr/lib/ruby/2.7.0/tsort.rb:205:in `tsort_each'
22: from /usr/lib/ruby/2.7.0/tsort.rb:226:in `tsort_each'
21: from /usr/lib/ruby/2.7.0/tsort.rb:347:in `each_strongly_connected_component'
20: from /usr/lib/ruby/2.7.0/tsort.rb:347:in `call'
19: from /usr/lib/ruby/2.7.0/tsort.rb:347:in `each'
18: from /usr/lib/ruby/2.7.0/tsort.rb:349:in `block in each_strongly_connected_component'
17: from /usr/lib/ruby/2.7.0/tsort.rb:431:in `each_strongly_connected_component_from'
16: from /usr/lib/ruby/2.7.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
15: from /usr/lib/ruby/2.7.0/tsort.rb:228:in `block in tsort_each'
14: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:61:in `block in run_initializers'
13: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:32:in `run'
12: from /var/lib/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:32:in `instance_exec'
11: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/railtie.rb:84:in `block in <class:Engine>'
10: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker.rb:35:in `bootstrap'
9: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/commands.rb:25:in `bootstrap'
8: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/manifest.rb:18:in `refresh'
7: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/manifest.rb:83:in `load'
6: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:51:in `public_manifest_path'
5: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:47:in `public_output_path'
4: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:43:in `public_path'
3: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:84:in `fetch'
2: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:88:in `data'
1: from /var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:91:in `load'
/var/lib/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:95:in `rescue in load': Webpacker configuration file not found /home/arian/projects/Arian-p1/config/webpacker.yml. Please run rails webpacker:install Error: No such file or directory # rb_sysopen - /home/arian/projects/Arian-p1/config/webpacker.yml (RuntimeError)
I installed bundler 2.1.4
I am running on Ubuntu.
The last line of the stack trace tells you what to do
Please run rails webpacker:install
Its missing the file config/webpacker.yml which gets created by the command bundle exec rails webpacker:install
Run gem install bundler:2.1.4. If that doesn't work, you could also try gem update --system.
I am getting this error while creating a migration. I'm using MySQL as the database, with rails 6.0.3.2 and ruby 2.6.6
the full error is
Traceback (most recent call last):
51: from bin/rails:4:in `<main>'
50: from bin/rails:4:in `require'
49: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.2/lib/rails/commands.rb:18:in `<top (required)>'
48: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.2/lib/rails/command.rb:46:in `invoke'
47: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.2/lib/rails/command/base.rb:69:in `perform'
46: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
45: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
44: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
43: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.2/lib/rails/commands/generate/generate_command.rb:21:in `perform'
42: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.2/lib/rails/command/actions.rb:15:in `require_application_and_environment!'
41: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.2/lib/rails/command/actions.rb:28:in `require_environment!'
40: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.2/lib/rails/application.rb:339:in `require_environment!'
39: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `require'
38: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:291:in `load_dependency'
37: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `block in require'
36: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/zeitwerk-2.4.0/lib/zeitwerk/kernel.rb:34:in `require'
35: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/zeitwerk-2.4.0/lib/zeitwerk/kernel.rb:34:in `require'
34: from C:/Users/Ritvik/Desktop/railsProjs/bkpk/config/environment.rb:5:in `<top (required)>'
33: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.2/lib/rails/application.rb:363:in `initialize!'
32: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:60:in `run_initializers'
31: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each'
30: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each'
29: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component'
28: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:347:in `call'
27: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:347:in `each'
26: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component'
25: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from'
24: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
23: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each'
22: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:61:in `block in run_initializers'
21: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:32:in `run'
20: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:32:in `instance_exec'
19: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/foreigner-1.7.4/lib/foreigner/railtie.rb:4:in `block in <class:Railtie>'
18: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/lazy_load_hooks.rb:42:in `on_load'
17: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/lazy_load_hooks.rb:42:in `each'
16: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/lazy_load_hooks.rb:43:in `block in on_load'
15: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/lazy_load_hooks.rb:66:in `execute_hook'
14: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/lazy_load_hooks.rb:61:in `with_execution_control'
13: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
12: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/lazy_load_hooks.rb:71:in `class_eval'
11: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/foreigner-1.7.4/lib/foreigner/railtie.rb:5:in `block (2 levels) in <class:Railtie>'
10: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/foreigner-1.7.4/lib/foreigner/loader.rb:3:in `load'
9: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/foreigner-1.7.4/lib/foreigner/loader.rb:3:in `module_eval'
8: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/foreigner-1.7.4/lib/foreigner/loader.rb:5:in `block in load'
7: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/foreigner-1.7.4/lib/foreigner/loader.rb:5:in `include'
6: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/foreigner-1.7.4/lib/foreigner/connection_adapters/abstract/schema_definitions.rb:5:in `included'
5: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/foreigner-1.7.4/lib/foreigner/connection_adapters/abstract/schema_definitions.rb:5:in `class_eval'
4: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/foreigner-1.7.4/lib/foreigner/connection_adapters/abstract/schema_definitions.rb:6:in `block in included'
3: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/foreigner-1.7.4/lib/foreigner/connection_adapters/abstract/schema_definitions.rb:6:in `include'
2: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/concern.rb:122:in `append_features'
1: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/concern.rb:122:in `class_eval'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/foreigner-1.7.4/lib/foreigner/connection_adapters/abstract/table.rb:7:in `block in <module:Table>': undefined method `alias_method_chain' for ActiveRecord::ConnectionAdapters::Table:Class (NoMethodError)
Did you mean? alias_method
I've looked at similar errors on stackoverflow, but haven't found a solution to my problem.
The gemfile has gem 'mysql2', '>= 0.4.4'. I tried it on MySQL 0.5.3 but still no luck.
Do you have foreigner gem in your gemfile ? Can you try removing it, doing a bundle install and retry ? According to the documentation of the gem it was rendered obsolete from rails 4.2 as rails added native support for the feature.
If it is not in your gemfile, you need to check what gem depends on it.
I am getting an error when trying to do anything within Rails 6 (e.g. database migrations, starting the server, dropping the database, etc.)
The error I get is:
ActiveSupport::MessageEncryptor::InvalidMessage: ActiveSupport::MessageEncryptor::InvalidMessage
C:/Users/environment/shafrica/config/environment.rb:5:in `<top (required)>'
Caused by:
OpenSSL::Cipher::CipherError:
C:/Users/environment/shafrica/config/environment.rb:5:in `<top (required)>'
Tasks: TOP => db:migrate => db:load_config => environment
(See full trace by running task with --trace)
I have looked around on Stackoverflow (e.g. this and this)
But they didn't fix my problem. I feel like it is related to my Postgresql database, but I haven't been able to get to anything conclusive. Does anyone have an idea?
Stack trace:
49: from bin/rails:4:in `<main>'
48: from bin/rails:4:in `require'
47: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/commands.rb:18:in <top (required)>'
46: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/command.rb:46:in `invoke'
45: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/command/base.rb:69:in `perform'
44: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
43: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
42: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
41: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in `perform'
40: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in `tap'
39: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:147:in `block in perform'
38: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:37:in `start'
37: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:77:in `log_to_stdout'
36: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rack-2.2.2/lib/rack/server.rb:422:in `wrapped_app'
35: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rack-2.2.2/lib/rack/server.rb:249:in `app'
34: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rack-2.2.2/lib/rack/server.rb:349:in `build_app_and_options_from_config'
33: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rack-2.2.2/lib/rack/builder.rb:66:in `parse_file'
32: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rack-2.2.2/lib/rack/builder.rb:105:in `load_file'
31: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rack-2.2.2/lib/rack/builder.rb:116:in `new_from_string'
30: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rack-2.2.2/lib/rack/builder.rb:116:in `eval'
29: from config.ru:3:in `block in <main>'
28: from config.ru:3:in `require_relative'
27: from C:/Users/environment/shafrica/config/environment.rb:5:in `<top (required)>'
26: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/application.rb:363:in `initialize!'
25: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:60:in `run_initializers'
24: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each'
23: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each'
22: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component'
21: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:347:in `call'
20: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:347:in `each'
19: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component'
18: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from'
17: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
16: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each'
15: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
14: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:32:in `run'
13: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:32:in `instance_exec'
12: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/devise-4.7.1/lib/devise/rails.rb:37:in `block in <class:Engine>'
11: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/devise-4.7.1/lib/devise/secret_key_finder.rb:10:in `find'
10: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/devise-4.7.1/lib/devise/secret_key_finder.rb:24:in `key_exists?'
9: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/core_ext/module/delegation.rb:297:in `method_missing'
8: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/encrypted_configuration.rb:38:in `options'
7: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/encrypted_configuration.rb:33:in `config'
6: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/encrypted_configuration.rb:21:in `read'
5: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/encrypted_file.rb:43:in `read'
4: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/encrypted_file.rb:80:in `decrypt'
3: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/messages/rotator.rb:21:in `decrypt_and_verify'
2: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/message_encryptor.rb:157:in `decrypt_and_verify'
1: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/message_encryptor.rb:201:in `_decrypt' C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/message_encryptor.rb:201:in `final': OpenSSL::Cipher::CipherError
This usually happens when the credentials aren't set right. In these cases
bin/rails credentials:edit (If you have EDITOR set in your $PATH)
or
EDITOR="nano" bin/rails credentials:edit (If you don't have EDITOR set in your $PATH)
This will generate a new credentials.yml.enc.
That should fix the error.