【发布时间】:2019-01-25 18:44:50
【问题描述】:
我正在尝试设置 VsCode 以在调试模式下运行我的规范测试。
我已将以下 launch.json 文件添加到项目中。我正在使用 rvm 并在该位置安装了必要的 gem,例如 rspec。
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "RSpec - all",
"type": "Ruby",
"request": "launch",
"program": "<home>.rvm/gems/ruby-2.4.5/gems/rspec",
"args": [
"-I",
"${workspaceRoot}/spec/*_spec.rb"
]
}
]
}
当我在调试模式下运行时,控制台中会显示以下内容。
未捕获的异常:无法加载此类文件 -- 主目录/.rvm/gems/ruby-2.4.5/gems/rspec
我已经根据我找到的文档安装了必要的扩展。 ruby、solargraph 和 rubicon
任何帮助将不胜感激。
谢谢你, 乔
【问题讨论】:
-
查看我对您问题的详细回答:stackoverflow.com/a/59104979/2175188
标签: ruby-on-rails ruby rspec visual-studio-code cucumber