Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

How to let launch.json read $GEM_HOME ? #367

Closed
qiulang opened this issue Jul 9, 2018 · 2 comments
Closed

How to let launch.json read $GEM_HOME ? #367

qiulang opened this issue Jul 9, 2018 · 2 comments
Labels

Comments

@qiulang
Copy link

qiulang commented Jul 9, 2018

  • vscode-ruby version:
  • Ruby version: 2.3.7+
  • VS Code version: 1.24.1
  • Operating System: macOS 10.13.5
  • Hardware (optional): MacBook Pro (Retina, 15-inch, Mid 2015)

The default launch.json will have a rspec task like this

    {
        "name": "RSpec - active spec file only",
        "type": "Ruby",
        "request": "launch",
        "cwd": "${workspaceRoot}",
        "program": "${workspaceRoot}/bin/rspec",
        "args": [
            "-I",
            "${workspaceRoot}",
            "${file}"
        ]
    },

But of course my rspec is not in ${workspaceRoot}/bin/rspec. I am using rvm so it is in $GEM_HOME/bin/rspec. But how do I set that ?

I set "program": "${GEM_HOME}/bin/rspec",

Got the error Uncaught exception: cannot load such file -- /Users/qiulang/Dev/ruby-HW/bundle/foodie/${GEM_HOME}/bin/rspec

@andrewmcodes
Copy link

Have you tried passing in the actual path instead of using an environment variable? Check this issue too.

@github-actions
Copy link

This issue has not had activity for 30 days. It will be automatically closed in 7 days.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants