我使用 MYSYS2(MINGW64) 安装了 Ruby,并使用gem install haml安装了Haml Gem 。 在项目文件夹中,我创建了捆绑Gemfile 命令,编写“gem haml”并通过安装haml 的捆绑安装依赖项来完成所有操作
命令haml index.haml index.html后 输出有错误,我该怎么办?
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/haml-6.2.3/lib/haml/cli.rb:114:in `method_missing': undefined method `index.haml' for #<Haml::CLI:0x00000164de897eb8 @_invocations={Haml::CLI=>["index.haml"]}, @_initializer=[["index.html"], [], {:shell=>#<Thor::Shell::Basic:0x00000164de221bd8 @base=#<Haml::CLI:0x00000164de897eb8 ...>, @mute=false, @padding=0, @always_force=false>, :current_command=>#<struct Thor::DynamicCommand name="index.haml", description="A dynamically-generated command", long_description="index.haml", wrap_long_description=nil, usage="index.haml", options={}, options_relation={}, ancestor_name=nil>}], @options={"escape_html"=>true, "escape_attrs"=>true}, @args=["index.html"], @shell=#<Thor::Shell::Basic:0x00000164de221bd8 @base=#<Haml::CLI:0x00000164de897eb8 ...>, @mute=false, @padding=0, @always_force=false>> (NoMethodError)
from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/thor-1.3.0/lib/thor/command.rb:30:in `run'
from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/thor-1.3.0/lib/thor/command.rb:144:in `run'
from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/thor-1.3.0/lib/thor/invocation.rb:127:in `invoke_command'
from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/thor-1.3.0/lib/thor.rb:527:in `dispatch'
from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/thor-1.3.0/lib/thor/base.rb:584:in `start'
from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/haml-6.2.3/exe/haml:6:in `<top (required)>'
from C:/Ruby32-x64/bin/haml:32:in `load'
from C:/Ruby32-x64/bin/haml:32:in `<main>'