hyperstack:install gives NoMethodError
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Tái hiện lỗi với Ruby 3.0.1, Rails 6.1.3.2 và rails-hyperstack 1.0.alpha1.8 bằng cách sử dụng repository tái hiện được liên kết. Bắt đầu từ hyper-operation/transport/connection_adapter/active_record/connection.rb và reactive_record/permissions.rb của hyper-model, sau đó lần theo entry point hyperstack:install; hoàn thành khi lệnh cài đặt chạy xong mà không có NoMethodError.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I'm attempting to create a new Rails app with Hyperstack, but I get an error during the hyperstack:install step.
EDIT: reproduction repo: https://github.com/CodingItWrong/hyperstack_rails
$ ruby --version
ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-darwin20]
$ rails --version
Rails 6.1.3.2
$ rails new hyperstack_rails -T
$ cd hyperstack_rails
Add gem 'rails-hyperstack', "~> 1.0.alpha1.0" to Gemfile
$ bundle install
The version installed is 1.0.alpha1.8
$ bundle exec rails hyperstack:install
Error output:
loading /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/rails-hyperstack-1.0.alpha1.8/lib/tasks/hyperstack/install.rake
/Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activerecord-6.1.3.2/lib/active_record/associations/builder/association.rb:53:in `build_scope': undefined method `arity' for {:foreign_key=>"connection_id", :class_name=>"Hyperstack::ConnectionAdapter::ActiveRecord::QueuedMessage", :dependent=>:destroy}:Hash (NoMethodError)
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activerecord-6.1.3.2/lib/active_record/associations/builder/association.rb:47:in `create_reflection'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activerecord-6.1.3.2/lib/active_record/associations/builder/association.rb:32:in `build'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activerecord-6.1.3.2/lib/active_record/associations.rb:1458:in `has_many'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/hyper-model-1.0.alpha1.8/lib/reactive_record/permissions.rb:82:in `block (2 levels) in singleton class'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/hyper-model-1.0.alpha1.8/lib/active_record_base.rb:284:in `has_many'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/hyper-operation-1.0.alpha1.8/lib/hyper-operation/transport/connection_adapter/active_record/connection.rb:15:in `<class:Connection>'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/hyper-operation-1.0.alpha1.8/lib/hyper-operation/transport/connection_adapter/active_record/connection.rb:8:in `<module:ActiveRecord>'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/hyper-operation-1.0.alpha1.8/lib/hyper-operation/transport/connection_adapter/active_record/connection.rb:7:in `<module:ConnectionAdapter>'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/hyper-operation-1.0.alpha1.8/lib/hyper-operation/transport/connection_adapter/active_record/connection.rb:6:in `<module:Hyperstack>'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/hyper-operation-1.0.alpha1.8/lib/hyper-operation/transport/connection_adapter/active_record/connection.rb:5:in `<main>'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:53:in `require_relative'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/hyper-operation-1.0.alpha1.8/lib/hyper-operation/transport/connection_adapter/active_record.rb:3:in `<main>'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/hyper-operation-1.0.alpha1.8/lib/hyper-operation/transport/connection.rb:13:in `adapter'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/hyper-operation-1.0.alpha1.8/lib/hyper-operation/transport/connection.rb:34:in `build_tables?'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/hyper-operation-1.0.alpha1.8/lib/hyper-operation/transport/hyperstack.rb:19:in `block (2 levels) in reset_operations'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3.2/lib/active_support/lazy_load_hooks.rb:68:in `block in execute_hook'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3.2/lib/active_support/lazy_load_hooks.rb:61:in `with_execution_control'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3.2/lib/active_support/lazy_load_hooks.rb:66:in `execute_hook'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3.2/lib/active_support/lazy_load_hooks.rb:43:in `block in on_load'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3.2/lib/active_support/lazy_load_hooks.rb:42:in `each'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3.2/lib/active_support/lazy_load_hooks.rb:42:in `on_load'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/railtie/configuration.rb:72:in `after_initialize'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/hyper-operation-1.0.alpha1.8/lib/hyper-operation/transport/hyperstack.rb:19:in `block in reset_operations'
from <internal:kernel>:90:in `tap'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/hyper-operation-1.0.alpha1.8/lib/hyper-operation/transport/hyperstack.rb:15:in `reset_operations'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/hyper-operation-1.0.alpha1.8/lib/hyper-operation/transport/hyperstack.rb:6:in `initialize_policies'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/hyper-operation-1.0.alpha1.8/lib/hyper-operation/transport/hyperstack_controller.rb:3:in `block in <module:Hyperstack>'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/actionpack-6.1.3.2/lib/action_dispatch/routing/mapper.rb:655:in `instance_exec'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/actionpack-6.1.3.2/lib/action_dispatch/routing/mapper.rb:655:in `block in with_default_scope'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/actionpack-6.1.3.2/lib/action_dispatch/routing/mapper.rb:901:in `scope'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/actionpack-6.1.3.2/lib/action_dispatch/routing/mapper.rb:654:in `with_default_scope'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/actionpack-6.1.3.2/lib/action_dispatch/routing/route_set.rb:425:in `eval_block'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/actionpack-6.1.3.2/lib/action_dispatch/routing/route_set.rb:434:in `block in finalize!'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/actionpack-6.1.3.2/lib/action_dispatch/routing/route_set.rb:434:in `each'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/actionpack-6.1.3.2/lib/action_dispatch/routing/route_set.rb:434:in `finalize!'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/application/routes_reloader.rb:51:in `each'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/application/routes_reloader.rb:51:in `finalize!'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/application/routes_reloader.rb:22:in `reload!'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/application/routes_reloader.rb:35:in `block in updater'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3.2/lib/active_support/file_update_checker.rb:83:in `execute'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/application/routes_reloader.rb:10:in `execute'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/application/finisher.rb:195:in `block in <module:Finisher>'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/initializable.rb:32:in `instance_exec'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/initializable.rb:32:in `run'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/initializable.rb:61:in `block in run_initializers'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/3.0.0/tsort.rb:347:in `each'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/3.0.0/tsort.rb:347:in `call'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/initializable.rb:60:in `run_initializers'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/application.rb:384:in `initialize!'
from /Users/josh/apps/opal/my_cool_app/config/environment.rb:5:in `<main>'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:332:in `block in require'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:299:in `load_dependency'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:332:in `require'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/application.rb:106:in `preload'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/application.rb:157:in `serve'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/application.rb:145:in `block in run'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/application.rb:139:in `loop'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/application.rb:139:in `run'
from /Users/josh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/application/boot.rb:19:in `<top (required)>'
from <internal:/Users/josh/.rbenv/versions/3.0.1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/Users/josh/.rbenv/versions/3.0.1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from -e:1:in `<main>'
- Ngôn ngữ chính
- JavaScript
- Star
- 538
- Fork
- 41
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của hyperstack-org/hyperstack
-
expose_as_operations method Đang mởenhancement needs doc
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
hyperstack-org/hyperstack#359 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
hyperstack-org/hyperstack#267 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
hyperstack-org/hyperstack#457 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
hyperstack-org/hyperstack#456 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
hyperstack-org/hyperstack#455 · 2 bình luận ·
Tất cả issue của hyperstack-org/hyperstack
Issue tương tự
-
ai-observability bug team/ai-observability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
AllTheMods/ATM-10-L#19 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
SignalK/n2k-signalk#345 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
JuliaPluto/PlutoPlotly.jl#72 ·