Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"erb-formatter not found by bundler" when using asdf #2

Open
archonic opened this issue Mar 11, 2023 · 8 comments
Open

"erb-formatter not found by bundler" when using asdf #2

archonic opened this issue Mar 11, 2023 · 8 comments

Comments

@archonic
Copy link

I have gem "erb-formater" in my Gemfile but I'm constantly getting a popup every time I save an ERB file saying bundler couldn't find erb-formatter. I believe this is because I'm using asdf as a version manager.

The shopify-lsp VS Code extension has "rubyLsp.rubyVersionManager": "asdf" to know where to look. Could we do something similar here?

@HLFH
Copy link

HLFH commented Jun 27, 2023

Same issue.

@andypeters
Copy link

+1 Same issue as well.

@Norfeldt
Copy link

Norfeldt commented Aug 8, 2023

I made a "working for now" solution (I'm using rtx to version control my ruby). Using the https://github.com/formulahendry/vscode-code-runner extension I can format it when I run code on .erb files by this vscode setting:

    "code-runner.executorMap": {
        "erb": "~/.local/share/rtx/installs/ruby/3.2.2/bin/erb-formatter $dir/$fileName --write"
    },
    "code-runner.enableAppInsights": false

@paperdiamond
Copy link

+1 same issue

@danchenkov
Copy link

I am using rbenv, but still get the same issue.

@Duartemartins
Copy link

Just when I thought I had found an ERB formatter.. 😂

@elia
Copy link
Member

elia commented Nov 3, 2023

I just merged #7 which fixes an issue for which it was erroneously showing that message whenever an ERB or HTML error was encountered, v0.3.0 will contain it. In case some of the issues you've seen were related to that.

@coder2000
Copy link

It seems the plugin is using the system ruby regardless of what is set by the users environment, aka asdf. I had 3.0.6 installed by Arch and it was using that instead of the 3.3.0 my project was using from asdf. When I removed the system ruby the plugin complained that it couldn't find ruby even though any other terminal I used was working fine.

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

No branches or pull requests

9 participants