1

I know RVM stands for Ruby Version Manager, and that it helps you manage the versions of ruby across projects.

But when running commands, programs or tasks some times you use rake and sometimes you use bundle.

Crixx93
  • 727
  • 10
  • 22
  • "Exactly"? They're three very different things, written to accomplish completely different tasks. Reading their documentation will quickly show the differences and their purposes. – the Tin Man Oct 23 '16 at 21:24

1 Answers1

1

The difference is that they're three separate projects with different goals.

RVM you've described yourself.

bundle is for Bundler which handles sets of "gem" dependencies. Installing the right versions for a project, updating the dependencies and so on.

rake is Rake which is a general build tool, typically used for things like running tests.

In some ecosystems there is a single tool that covers both these things (managing dependencies and running other tasks). In the Elixir ecosystem, for example, the "Mix" tool does both. In Ruby, they happen to be separate tools.

Henrik N
  • 15,786
  • 5
  • 82
  • 131
  • Thanks for the answer, that is exactly why I'm asking this, I'm learning Elixir and when learning about Mix, I realized that Ruby does this with two separate libraries. But, I've been working with Ruby using Cucumber and you run those test using bunlde not rake, with other testing libraries, you use rake. – Crixx93 Oct 22 '16 at 23:10
  • 1
    You run the tasks with `bundle exec` - which just runs whatever commands come after in the context of the bundle. That ensures whatever you are running has the correct gem versions. http://stackoverflow.com/questions/6588674/what-does-bundle-exec-rake-mean – max Oct 22 '16 at 23:38