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

Loading problem neovim #29

Open
mikezaby opened this issue Mar 8, 2022 · 2 comments
Open

Loading problem neovim #29

mikezaby opened this issue Mar 8, 2022 · 2 comments

Comments

@mikezaby
Copy link

mikezaby commented Mar 8, 2022

I am using direnv with a setup like this https://juliu.is/ditch-your-version-manager/
I have a Ruby On Rails project and I think that somethink not loading correctly in neovim, while with vim is working properly.

I am running the following commands to demonstrate the problem

!which ruby
/nix/store/fv8mr37kp374slp1b8dq231wqprb85fa-ruby-2.7.5/bin/ruby
:!which bundle
/nix/store/fv8mr37kp374slp1b8dq231wqprb85fa-ruby-2.7.5/bin/bundle
:!bundle exec rails
/nix/store/fv8mr37kp374slp1b8dq231wqprb85fa-ruby-2.7.5/lib/ruby/2.7.0/bundler/definition.rb:495:in `validate_ruby!': Your Ruby version is 2.6.8, but your Gemfile specified 2.7.5 (Bundler::RubyVersionMismatch)
        from /nix/store/fv8mr37kp374slp1b8dq231wqprb85fa-ruby-2.7.5/lib/ruby/2.7.0/bundler/definition.rb:470:in `validate_runtime!'
        from /nix/store/fv8mr37kp374slp1b8dq231wqprb85fa-ruby-2.7.5/lib/ruby/2.7.0/bundler.rb:143:in `setup'
        from /nix/store/fv8mr37kp374slp1b8dq231wqprb85fa-ruby-2.7.5/lib/ruby/2.7.0/bundler/setup.rb:20:in `block in <top (required)>'
        from /nix/store/fv8mr37kp374slp1b8dq231wqprb85fa-ruby-2.7.5/lib/ruby/2.7.0/bundler/ui/shell.rb:136:in `with_level'
        from /nix/store/fv8mr37kp374slp1b8dq231wqprb85fa-ruby-2.7.5/lib/ruby/2.7.0/bundler/ui/shell.rb:88:in `silence'
        from /nix/store/fv8mr37kp374slp1b8dq231wqprb85fa-ruby-2.7.5/lib/ruby/2.7.0/bundler/setup.rb:20:in `<top (required)>'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

shell returned 1

For some reason is trying to use system ruby

@felschr
Copy link

felschr commented Jun 26, 2022

Does it work after you manually run :DirenvExport?

I have the same or a similar issue with neovim. After opening a project from vim-startify I need to run :DirenvExport for the environment to load. If I open vim in the project directory directly, the direnv environment loads fine, though.
So this seems to be an issue with vim-startify in some way, probably an issue with the DirChanged autocmd.

@felschr
Copy link

felschr commented Jun 26, 2022

I've just switched to alpha-nvim and the issue is gone.

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

No branches or pull requests

2 participants