Ruby Intellij:显示为错误的流浪客和主机行

Ruby Intellij:显示为错误的流浪客和主机行,ruby,intellij-idea,vagrant,vagrantfile,Ruby,Intellij Idea,Vagrant,Vagrantfile,我在一个流浪汉文件中有以下代码: # Create a forwarded port mapping which allows access to a specific port # within the machine from a port on the host machine. In the example below, # accessing 'localhost:8080' will access port 80 on the guest machine. confi

我在一个流浪汉文件中有以下代码:

  # Create a forwarded port mapping which allows access to a specific port
  # within the machine from a port on the host machine. In the example below,
  # accessing 'localhost:8080' will access port 80 on the guest machine.
  config.vm.network :forwarded_port, guest: 9999, host: 9998
  config.vm.network :forwarded_port, guest: 3500, host: 3502
这段代码运行正常,但Intellij认为这是一个错误。我已经安装了一个,希望它能解决这个问题,但它没有


如何让Intellij在使用Vagrant时不将以下两行标记为错误

您的文件是否与任何特定类型关联(您可以在编辑器>文件类型下的首选项中进行检查)

如果是这种情况,您可以更改为以文本文件的形式关联,IntelliJ不会抱怨

如果您不喜欢使用命令行和vagrant命令,那么vagrant插件允许交互(启动/停止…),但它不支持vagrant文件