Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

hyperstack:install gives NoMethodError

未關閉
#413 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
rails, ruby
領域
backend

研究方向

使用連結的重現儲存庫,透過 Ruby 3.0.1、Rails 6.1.3.2 和 rails-hyperstack 1.0.alpha1.8 重現此故障。從 hyper-operation/transport/connection_adapter/active_record/connection.rb 和 hyper-model 的 reactive_record/permissions.rb 開始,然後追蹤 hyperstack:install 進入點;當安裝命令在沒有 NoMethodError 的情況下完成時,即表示完成。

由索引模型根據 Issue 內容生成。

描述

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>'
主要語言
JavaScript
星號
538
分支
41
PR 合併指標
30 天內沒有已合併 PR

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

hyperstack-org/hyperstack 的其他 Issue

查看 hyperstack-org/hyperstack 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。