Modern Front-End Development for Rails - hello_typescript.js web console output for Rails 6

I’m using ruby 2.7.1 and Rails 6.0.3.2 on Ubuntu 20.04 LTS.

I was not able to see the web console output for the hello_typescript.js pack using the javascript_pack_tag until I added a new controller and had a default/root route so that the standard Rails 6 splash page was suppressed.

I’ve just started working through the book so apologies if this is addressed later or if there is an alternative solution.

For context see page 13 and the discussion around
<%= javascript_pack_tag(“hello_typescript”) %>

Also, note I used the following format, without parentheses, to match the application pack tag reference in the generated application.html.erb: <%= javascript_pack_tag ‘hello_typescript’ %>

2 Likes