Sometimes, when you install a gem, it also has an executable / binary file. These include: rails, rake, rspec, pry, etc. However, when you have several versions of gem installed, you will have several versions of these executables sitting around. Therefore, if you want to execute one of these binaries for a given rails application, you may need to eliminate which executable you want - for example, for rake v10.1 or for rake v10.2. Since the answer to this can be found by the version of the gem that you have in your Gemfile.lock file (which is created by the binder), bundler provides a command to execute the binary file based on the version specified in the current Gemfile project. Castle. This team bundle exec <command>.
, bundle exec <command>, , ( , , Gemfile. ). - rails. , , rails, - , . , , rails.
, , :
rails server
rails console
bundle exec <some command that isn't rails>