<commit_before># rake-compiler-dev-box

A virtual machine for using rake-compiler.

[rake-compiler](https://github.com/luislavena/rake-compiler) is **totally awesome**, and you should be using it if you maintain a Ruby gem with C or Java extensions to build native binaries for your users.

_However_, getting your local environment set up to build for all the assorted platforms can be a pain.  Thankfully, we have the amazing tool [Vagrant](http://www.vagrantup.com) for "lightweight, reproducible, and portable development environments."

rake-compiler + Vagrant = easy native gems for all.

## Dependencies

* [VirtualBox](https://www.virtualbox.org)
* [Vagrant](http://www.vagrantup.com)

## How to Build the Virtual Machine

Easy-peasy:

    $ git clone https://github.com/tjschuck/rake-compiler-dev-box.git
    $ cd rake-compiler-dev-box
    $ vagrant up

That's it!  Go grab a cup of coffee, though -- it can take a couple of minutes to build the first time.

## Building Your Native Gems

Once you have your gem ready to package, clone or move your repo into the same directory as the rake-compiler-dev-box:

    $ pwd
    /Users/tjschuck/Code/rake-compiler-dev-box
    $ git clone <EMAIL>@github.com:codahale/bcrypt-ruby.git
    Cloning into 'bcrypt-ruby'...
    [...], done.

Now fire up your virtual machine (if you haven't already):

    $ vagrant up<commit_msg>Update dependencies to be a bit looser<commit_after># rake-compiler-dev-box

A virtual machine for using rake-compiler.

[rake-compiler](https://github.com/luislavena/rake-compiler) is **totally awesome**, and you should be using it if you maintain a Ruby gem with C or Java extensions to build native binaries for your users.

_However_, getting your local environment set up to build for all the assorted platforms can be a pain.  Thankfully, we have the amazing tool [Vagrant](http://www.vagrantup.com) for "lightweight, reproducible, and portable development environments."

rake-compiler + Vagrant = easy native gems for all.

## Dependencies

* [Vagrant](http://www.vagrantup.com)
* A supported [Vagrant provider](https://docs.vagrantup.com/v2/providers/index.html) — [VirtualBox](https://docs.vagrantup.com/v2/virtualbox/index.html), [Hyper-V](https://docs.vagrantup.com/v2/hyperv/index.html), and [VMware Fusion](https://docs.vagrantup.com/v2/vmware/index.html) should all work.

## How to Build the Virtual Machine

Easy-peasy:

    $ git clone https://github.com/tjschuck/rake-compiler-dev-box.git
    $ cd rake-compiler-dev-box
    $ vagrant up

That's it!  Go grab a cup of coffee, though -- it can take a couple of minutes to build the first time.

## Building Your Native Gems

Once you have your gem ready to package, clone or move your repo into the same directory as the rake-compiler-dev-box:

    $ pwd
    /Users/tjschuck/Code/rake-compiler-dev-box
    $ git clone <EMAIL>:codahale/bcrypt-ruby.git
    Cloning into 'bcrypt-ruby'...
    [...], done.

Now fire up your virtual machine (if you haven't already):

    $ vagrant up
{'fraction_non_alphanumeric': 0.10658722277391593, 'fraction_numerical': 0.0013240648791790798, 'mean_word_length': 3.7816455696202533, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 9, 'lorem ipsum': 0, 'www.': 5, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6729266', 'n_tokens_mistral': 955, 'n_tokens_neox': 927, 'n_words': 333}