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

rails g kaminari:views bulma does not work on Ruby 3 #1069

Open
SananMaarouf opened this issue Sep 20, 2021 · 2 comments
Open

rails g kaminari:views bulma does not work on Ruby 3 #1069

SananMaarouf opened this issue Sep 20, 2021 · 2 comments

Comments

@SananMaarouf
Copy link

When i try to generate views with the bulma theme with the command rails g kaminari:views bulma i get
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/kaminari-core-1.2.1/lib/generators/kaminari/views_generator.rb:117:in `initialize': Invalid argument @ rb_sysopen - https://api.github.com/repos/amatsuda/kaminari_themes/git/refs/heads/master (Errno::EINVAL)

here is the complete error message
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/kaminari-core-1.2.1/lib/generators/kaminari/views_generator.rb:117:in `open' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/kaminari-core-1.2.1/lib/generators/kaminari/views_generator.rb:117:in `get_files_in_master' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/kaminari-core-1.2.1/lib/generators/kaminari/views_generator.rb:41:in `themes' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/kaminari-core-1.2.1/lib/generators/kaminari/views_generator.rb:22:in `banner' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/group.rb:31:in `help' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/group.rb:219:in `dispatch' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/base.rb:485:in `start' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/generators.rb:275:in `invoke' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/commands/generate/generate_command.rb:26:in `perform' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/command/base.rb:69:in `perform' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/command.rb:48:in `invoke' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/commands.rb:18:in `<main>' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' from bin/rails:4:in `<main>
I am using Rails 6 and Ruby 3.0.2p10

@blrobin2
Copy link

The fix for this is in the master branch (namely, using URI.open explicitly instead of delegating through Kernel#open, which was deprecated in Ruby 2.5 and removed in Ruby 3.0)

Therefore, I believe it is just a matter of waiting for Version 1.2.2 to come out

That said, anyone please correct me if they know otherwise

@MyklClason
Copy link

The fix for this is in the master branch (namely, using URI.open explicitly instead of delegating through Kernel#open, which was deprecated in Ruby 2.5 and removed in Ruby 3.0)

Therefore, I believe it is just a matter of waiting for Version 1.2.2 to come out

That said, anyone please correct me if they know otherwise

If it's in master, then use master though might want to revert it back after you do so:

gem 'kaminari', git: 'https://github.com/kaminari/kaminari.git'

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