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

Easyish fix: 02-pretty.rb fails at kaminari:views #740

Closed
neeklamy opened this issue Sep 10, 2017 · 1 comment
Closed

Easyish fix: 02-pretty.rb fails at kaminari:views #740

neeklamy opened this issue Sep 10, 2017 · 1 comment

Comments

@neeklamy
Copy link

Kaminari 1.0.1 has a problem with its view generator, this trips up the 02-pretty.rb template:

rails new searchapp --skip --skip-bundle --template https://raw.github.com/elastic/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/02-pretty.rb
[…]
    generate    kaminari:views
/home/chris/.rvm/gems/ruby-2.4.1@elasticsearch_demo/gems/kaminari-core-1.0.1/lib/generators/kaminari/views_generator.rb:114:in `initialize': No such file or directory @ rb_sysopen - https://api.github.com/repos/amatsuda/kaminari_themes/git/refs/heads/master (Errno::ENOENT)
	from /home/chris/.rvm/gems/ruby-2.4.1@elasticsearch_demo/gems/kaminari-core-1.0.1/lib/generators/kaminari/views_generator.rb:114:in `open'
	from /home/chris/.rvm/gems/ruby-2.4.1@elasticsearch_demo/gems/kaminari-core-1.0.1/lib/generators/kaminari/views_generator.rb:114:in `get_files_in_master'
	from /home/chris/.rvm/gems/ruby-2.4.1@elasticsearch_demo/gems/kaminari-core-1.0.1/lib/generators/kaminari/views_generator.rb:40:in `themes'
	from /home/chris/.rvm/gems/ruby-2.4.1@elasticsearch_demo/gems/kaminari-core-1.0.1/lib/generators/kaminari/views_generator.rb:29:in `copy_or_fetch'
[…]

Thankfully this has been fixed on Kaminari HEAD, it just hasn’t made it to a release yet, kaminari/kaminari#912

In the meantime, either 02-pretty.rb or the Gemfile can be updated to point directly to the Kiminari commit:

gem 'kaminari', :github => 'kaminari/kaminari', :ref => '6f338aa2d7e3beb92db0cec5568aa8773351bfb8'

And thanks for the templates, they’re a great introduction to using Elasticsearch!

@nilbus
Copy link
Contributor

nilbus commented Dec 14, 2017

👍 Good find. As you said, this was broken until kaminari released 1.1.0. Since elasticsearch-rails doesn't specify a specific version, it pulls the latest, and applying the 02-pretty.rb template works again now.

This issue can be closed.

@neeklamy neeklamy closed this as completed May 3, 2018
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

2 participants