Search code examples
ruby-on-railsrubydebianhotwire-railshotwire

Does installing hotwire in a rails project require Javascript?


My OS is Linux and my distribution is debian-bullseye. My ruby version is 3.1 and my rails version is 7.

I created a rails project

rails new chat --skip-javascript
cd chat/

I installed hotwire

bundle add hotwire-rails
rails hotwire:install

And I got this error

You must either be running with node (package.json) or importmap-rails (config/importmap.rb) to use this gem.

I am trying to follow this tutorial


Solution

  • it's just a demo, made back when rails 6 was a thing. rails 7 has it by default. rails new chat is all you need. it'll set up all the javascript for you. hotwire-rails is not a thing anymore. Alex