Following up on my Guard tutorial, I explain here how to setup Guard to run
bundle installautomatically everytime you modify your
If you don't know Guard yet, please read my Guard tutorial first.
Working with a
Gemfilecan be annoying: edit the file, run
bunde install, check for error messages, repeat. Or even forget to run
bundle installand check in copies of
Gemfile.lockthat don't match into version control.
With Guard, you can avoid this. Setup like in this tutorial, it will run
bundle installautomatically for you.
Guard's support for Bundler comes as a separate gem, the
Install the Gem
To install the
guard-bundlergem, add it to your
Guard watches the files in your project directory, and responds to changes by running a configurable command or plugin.
This is very useful functionality. I feel that the Guard website makes it harder than necessary to get started though. Therefore I wrote this tutorial.
Why use Guard?
Example uses for Guard are:
- Automatically run your tests after your code changes
bundle installwhen you edit your Gemfile
- Migrate your database when you change a migration
- Restart your Sinatra server after you edited your Ruby code
Here are the basic steps to get started with Guard.
In order to know where I stand with the library, I needed to compare Crystal-Redis with other client libraries in other programming languages. I built a simple benchmark and ported it.
First I measured Crystal against Ruby and C, but then I enjoyed the process and compared also against Go, Node.js and Java. The results are fascinating.
subscribe via RSS