Bundler uses binstub, which was created for another gem.

When I start the rail console using

rails console

everything is fine.

When I start the rail console using

bundle exec rails console

I get the following warning

Bundler is using a binstub that was created for a different gem.
This is deprecated, in future versions you may need to `bundle binstub my_gem` to work around a system/bundle conflict.

my_gem - This is a gem that I created, which is not completely connected and is not used in the current project directory.

I tried every solution in this question with no luck: Bundler uses binstub, which was created for another gem

I would appreciate any guidance on resolving this warning, or help understand how binstubs work so I can understand what is going on.

+4
source share
2 answers

"" . . , "rails" "spring" ( ).

"bin", , ,

bundle exec rails console

bundle exec spring rails console

,

bin/rails console

, spring zeus - .

, "bin/rails" , , , .

bin/rake rails:update:bin

bin/rake, , ,

bundle exec rake rails:update:bin

( bin/rake spring)

./bin , , rake ( - ), ./bin/rake, .

  • bin/*, (, , Rails bundle binstub <gemname>) - Bundler, Bundler .

  • - (, ), , (, which mygem) - , , , "bundler/setup", Bundler ( bundler Gemfile). , bundler ( , "" , "" ).

  • , , , , RVM .rbenv, bin ( ).

  • , bin, , - Ruby, , - , - ( ).

: https://github.com/sstephenson/rbenv/wiki/Understanding-binstubs

+5

. bundle install .

, rvm .

-1

All Articles