Skip to content

app:template did not install default component files correctly. #38

@helpotters

Description

@helpotters

What did you do?

Ran rails app:template LOCATION="https://railsbytes.com/script/zJosO5".

What did you expect to happen?

For it to install the default component files so it can correctly generate rails g view_component Example later.

What actually happened?

During installation, it failed to set the appropriate file extensions for .haml. Instead of component.html.haml, it made component.html.tt. No errors were raised, leading to it not generating .haml and preview.rb files during rails g view_component Example.

Additional Context

This is not a fresh installation of ViewComponents, I had existing components already.

Environment

I am using HAML and esbuild.

# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem 'sprockets-rails'
gem 'view_component', '~> 3.5'
gem 'erb2haml', '~> 0.1.5', group: :development
gem 'jsbundling-rails', '~> 1.1'
gem 'cssbundling-rails'
gem 'haml-rails'

Ruby Version:

ruby '3.2.0'

Framework Version (Rails, whatever):

rails 7.0.4

View Component Contrib Version:

"view_component-contrib", "~> 0.1.4"

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions