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

hyperstack:install gives NoMethodError #413

Open
CodingItWrong opened this issue May 19, 2021 · 3 comments
Open

hyperstack:install gives NoMethodError #413

CodingItWrong opened this issue May 19, 2021 · 3 comments

Comments

@CodingItWrong
Copy link

CodingItWrong commented May 19, 2021

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>'
@catmando
Copy link
Contributor

catmando commented Aug 3, 2021

@CodingItWrong can you try with ruby 2.x . and/or earlier version of rails? .. there may be some bug in 3.x or latest rails as the install process is tested in the CI server, so I know it works, but only with ruby 2.x

@laquereric
Copy link

laquereric commented Aug 16, 2021

Reproduced with ruby 3.0.2, rails 6.1.4 and OSX 10.15

@laquereric
Copy link

Seems to be resolved by https://github.com/rails/rails/releases/tag/v6.1.4.1

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

3 participants