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 doesn't generate anything #1071

Open
Shpigford opened this issue Oct 29, 2021 · 12 comments · May be fixed by #1108
Open

rails g kaminari:views doesn't generate anything #1071

Shpigford opened this issue Oct 29, 2021 · 12 comments · May be fixed by #1108
Labels

Comments

@Shpigford
Copy link

Ruby 3.0.2
Rails 7.0.0.alpha2

Running rails g kaminari:views doesn't generate anything (including errors).

CleanShot 2021-10-29 at 08 59 53@2x

I wish I could give more info, but absolutely nothing happens, so not really sure what other info to give here.

@krlosgilson
Copy link

When you run rails g kaminari:views default doesn't the list of available themes appear either?

@izaguirrejoe
Copy link

I had the same problem. I had to run with explicit template engine: rails g kaminari:views default -e erb. I'm using tailwindcss, that seems to cause a problem with the generator.

@SatoshiNakao-git
Copy link

I had the same one (and I'm using tailwindcss too).
Finally I made directory and 7 file manually :

views/kaminari
 -_first_page.html.erb
 -_gap.html.erb
 ...
 - _prev_page.html.erb

and I paste the code↓ someone wrote with tailwind. That worked well.
amatsuda/kaminari_themes#73

@kulbirsaini
Copy link

I had the same problem. I had to run with explicit template engine: rails g kaminari:views default -e erb. I'm using tailwindcss, that seems to cause a problem with the generator.

Thank you for listing the fix. Many months later, this is still an issue.

@rslhdyt
Copy link

rslhdyt commented Aug 7, 2022

Still happened in
Rails 7.0.2
Kaminari 1.2.2
with tailwindcss-rails

Running rails g kaminari:views was not generated anything

I've tried run other template rails g kaminari:views github and got this error

template_engine: tailwindcss is not available for theme: github

@barakadanny
Copy link

rails g kaminari:views default -e erb

This also solved my issue.

note am using Tailwind

@crazywoola
Copy link

crazywoola commented Apr 11, 2023

I have same issue here.

A possible solution was:

  1. comment the gem
# gem "tailwindcss-rails", "~> 2.0"
  1. run
bundle install
rails g kaminari:views default or whaterver
  1. uncomment the gem
gem "tailwindcss-rails", "~> 2.0"
  1. run
bundle install

You are good to go.

@tomazzaman
Copy link

Can confirm, still an issue. Good thing I found this thread.

@stavros-souvatzis
Copy link

I had the same problem. I had to run with explicit template engine: rails g kaminari:views default -e erb. I'm using tailwindcss, that seems to cause a problem with the generator.

This should be added to the documentation. It's a sweet solution, helpful to many users.

Xavier-IV added a commit to Xavier-IV/kaminari that referenced this issue Aug 21, 2023
Fixes rails g kaminari:views doesn't generate anything kaminari#1071
@Xavier-IV Xavier-IV linked a pull request Aug 21, 2023 that will close this issue
@Xavier-IV
Copy link

Hey, faced this on my rails project having tailwindcss.
Debugging the gem seems like the engine was being set to tailwindcss.

Added a quick fix for it for small validation:
#1108

@yuki24 yuki24 added the Bug label Feb 5, 2024
@yuki24
Copy link
Member

yuki24 commented Feb 5, 2024

Thank you all for reporting this. I acknowledge that this is a bug and I will have to take time to understand.

@interhive
Copy link

interhive commented Mar 2, 2024

I had the same issue but got it to work by explicitly requesting erb templates:

rails g kaminari:views default -e erb

edit: sorry, I missed #1071 (comment) above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.