Search code examples
ruby-on-railsrubyrubygemsrakebundle

use of bundle exec in Ruby on Rails


What does bundle exec rake db:migrate really means? or bundle exec rails s I understand that bundle handle all the gems we specify in our Gemfile,and rake handle all the things which you can do through scripts but these commands don't get executed without prefixing bundle exec and I couldn't find any documentation about this on internet !!


Solution

  • Bundler - The best way to manage your application's dependencies

    Run the command in context of the bundle

    $ bundle exec

    Exec runs a command, providing it access to the gems in the bundle. While using bundle exec you can require and call the bundled gems as if they were installed into the systemwide RubyGems repository