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

Followed README but getting error #8

Closed
josebalius opened this issue Oct 10, 2023 · 8 comments
Closed

Followed README but getting error #8

josebalius opened this issue Oct 10, 2023 · 8 comments

Comments

@josebalius
Copy link

couldn't find file 'htmx' with type 'application/javascript'

Followed readme instructions, ran the generator but getting the error above. Generator showed:

❯ rails g htmx:install
      append  app/assets/javascripts/application.js

using rails 7

@megatux
Copy link
Contributor

megatux commented Oct 11, 2023

Hello @josebalius. I think the issue is related to the use of importmaps in Rails 7 default setup. I'm working on a PR to fix it.

@megatux
Copy link
Contributor

megatux commented Oct 12, 2023

The PR is having some issues in the CI with jruby but in the meantime @josebalius you can try it if you want. I did a small htmx test w/Rails 7.1 app and seems to work fine.

@psycho-baller
Copy link

I am using bun and have the same issue btw

@megatux
Copy link
Contributor

megatux commented Oct 26, 2023

@josebalius the #9 was merged to fix this issue. Would be great if you could try it again. Thanks

@megatux
Copy link
Contributor

megatux commented Oct 26, 2023

@psycho-baller the #9 was merged to fix this issue just for importmaps. I'll create a new issue just for adding support for bun. I was already researching it and seems doable. BTW, could help me if you have some repo with a Rails+bun example. Regards

@megatux
Copy link
Contributor

megatux commented Oct 26, 2023

Closed as fixed with #9 (importmaps scenario)

@psycho-baller
Copy link

@megatux Here's thie simple repo I made with bun

@megatux
Copy link
Contributor

megatux commented Nov 17, 2023

Thanks @psycho-baller, I ran your app and the generator with some changes I did on this #12 PR branch. Seems to work here with a basic htmx test.

If you want to try it you can use the branch with this in your Gemfile

gem 'htmx-rails', :github => 'rootstrap/htmx-rails', :branch => 'issue-10__add_bun_support'

or wait till the PR is reviewed and merged.
Regards!

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