Askar

Joined

170 Experience
1 Lesson Completed
0 Questions Solved

Activity

Full output

Create controllers directory
      create  app/javascript/controllers
      create  app/javascript/controllers/index.js
      create  app/javascript/controllers/application.js
      create  app/javascript/controllers/hello_controller.js
You must import "./controllers" in your JavaScript entrypoint
Install Stimulus
         run  yarn add @hotwired/stimulus from "."
yarn add v1.22.17
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ @hotwired/stimulus@3.0.1
info All dependencies
└─ @hotwired/stimulus@3.0.1
✨  Done in 5.11s.
You must import @hotwired/turbo-rails in your JavaScript entrypoint file
Install Turbo
         run  yarn add @hotwired/turbo-rails from "."
yarn add v1.22.17
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
success Saved lockfile.
success Saved 2 new dependencies.
info Direct dependencies
└─ @hotwired/turbo-rails@7.1.0
info All dependencies
├─ @hotwired/turbo-rails@7.1.0
└─ @hotwired/turbo@7.1.0
✨  Done in 4.87s.
Run turbo:install:redis to switch on Redis and use it in development for turbo streams

Hi,
When running rails hotwire:install, it shows 2 warnings:

You must import "./controllers" in your JavaScript entrypoint
You must import @hotwired/turbo-rails in your JavaScript entrypoint file

Where is that JavaScript entrypoint file application.js?
Under javascript/controllers or javascript/packs ?

Thanks.

What if I want uploading files as non-attachment?
Can't find information on ActiveStorage documentation.

logo Created with Sketch.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2022 GoRails, LLC. All rights reserved.