Skip to content

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

Open

Description

@0num4

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

image

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

Activity

  1. 0num4 commented on Dec 20, 2023

    @0num4
    Author
    [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のエラーログです

  2. mame commented on May 3, 2024

    @mame
    Member

    再現を試みたのですが、こちらではふつうに動いてしまいました。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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions