Followed README but getting error
Closed this issue · 8 comments
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
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.
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.
I am using bun and have the same issue btw
@josebalius the #9 was merged to fix this issue. Would be great if you could try it again. Thanks
@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
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!