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

質問: bundle installした際の--vendor pathについて #218

Open
0num4 opened this issue Dec 20, 2023 · 2 comments
Open

質問: bundle installした際の--vendor pathについて #218

0num4 opened this issue Dec 20, 2023 · 2 comments

Comments

@0num4
Copy link

0num4 commented Dec 20, 2023

#217 にて、macだと特に何も入れなくても動くと説明したのですが、bundle install --path vendor/bundleをするとうまくsample.rbを解析できず、下記のようなデフォルトの状態になって今います。

image

これはbundle install --path vendor/bundleが原因だと思いますか?

@0num4
Copy link
Author

0num4 commented Dec 20, 2023

[vscode] Try to start TypeProf for IDE
[vscode] stderr: bundler: failed to load command: typeprof (/Users/0num4/.anyenv/envs/rbenv/versions/3.2.2/bin/typeprof)
[vscode] stderr: /Users/0num4/.anyenv/envs/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.20/lib/bundler/resolver.rb:312:in `raise_not_found!': Could not find gem 'rbs' in locally installed gems. (Bundler::GemNotFound)
[vscode] stderr: 	from /Users/0num4/.anyenv/envs/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.20/lib/bundler/resolver.rb:372:in `block in prepare_dependencies'
略
[vscode] stderr: 	from /Users/0num4/.anyenv/envs/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.20/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
[vscode] stderr: 	from /Users/0num4/.anyenv/envs/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.20/exe/bundle:29:in `<top (required)>'
[vscode] stderr: 	from /Users/0num4/.anyenv/envs/rbenv/versions/3.2.2/bin/bundle:25:in `load'
[vscode] stderr: 	from /Users/0num4/.anyenv/envs/rbenv/versions/3.2.2/bin/bundle:25:in `<main>'
[vscode] failed to invoke typeprof: error code 1
[vscode] Ruby TypeProf is not configured

こちらがvscodeのoutputのエラーログです

@mame
Copy link
Member

mame commented May 3, 2024

再現を試みたのですが、こちらではふつうに動いてしまいました。bundle install なら動作するのでしょうか?
遅くなったうえで大変恐縮なのですが、再現方法を詳しく説明いただけるとありがたいです。

こちらが試したのは、rbenv install 3.2.2 したうえで

Gemfile

source "https://rubygems.org"
gem "typeprof", require: false

.ruby-version

3.2.2

sample.rb

def foo
end

を用意し、bundle install --path vendor/bundle し、そのディレクトリを vscode で開いたところ、def foo の上に推論結果が表示されることを確認しました。

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

2 participants