How to avoid installation of gcc for OS X users to install the vagrant-berkshelf plugin?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

How to avoid installation of gcc for OS X users to install the vagrant-berkshelf plugin?

Matthew Russell
I learned earlier today that in order to "vagrant plugin install vagrant-berkshelf", you have to have some developer tools such as gcc already installed on your system. Given that I had it installed on my Mac already and that Vagrant for Windows comes with some mingw utilities including gcc, it didn't occur to me that Berkshelf dependencies such as nio4r require it since I didn't encounter any errors during routine testing. I was honestly a bit surprised by this since it is often the case that things are more difficult to do on Windows than on a Mac when it comes to development.

While I know it's not unreasonable to expect a consumer of this virtual machine to install gcc and developer tools, I'd like to avoid it if at all possible in order to keep the process as simple and streamlined as possible. Right now, the steps to get up and running with my project are 0) checkout a GitHub repo, 1) Download/install Virtualbox, 2) Download/install Vagrant, 3) "vagrant plugin install vagrant-berkshelf" and 4) "vagrant up"....except for OS X users, which now need to do a step 2.5: go get the gcc toolchain.

I would submit that distributing an embedded gcc with Vagrant for OS X could be a useful thing to do since it would remove the need for one extra layer of indirection for anyone wanting to use really common plugins like Berkshelf, but that's not really my appeal. I'm sure it's been considered before and deemed unnecessary or not a higher enough priority (though I couldn't find any background discussion threads on it.)

The question I'm hoping to get some advice on is more along the lines of whether or not anyone has any recommendation that would be "simpler than asking non-technical OS X users to install the gcc toolchain" e.g. pre-building the vagrant-berkshelf dependencies and hosting them myself somehow? I don't know much about the Ruby ecosystem...maybe these are already hosted somewhere and I could replace step (3) above with "run a shell script  in the source code checkout that gets the dependencies and installs berkshelf for you if you are on OS X" or something along those lines if I did it right?

As background, my goal in using Vagrant is to create, distribute, and maintain a VM that provides a highly interactive experience that's portable across platforms for readers of my latest book, Mining the Social Web (2nd Ed.) An explicit assumption I am *not* making is that readers are developers or even power users that want to get bogged down in any more installation than is absolutely necessary. On the contrary, I am already supporting readers who are just tinkers, hackers, or have very little programming experience but want to learn how to program with Python in response to the enthusiasm generated by my book/project. These folks know very little about working in terminals or using tools on the command line, and although asking them to install one more package isn't unreasonable, I really do want to avoid it if at all possible. It's just one more thing to do that redirects them elsewhere, where I might lose them along the way. I really want to keep the installation as simple as possible with as few redirects along the way. (To that end, I'd even considered just exporting the Virtualbox and having the steps be 1) install Virtualbox, 2) run this Virtualbox image I give you to make it as simple as possible, but I believe there are some longer term benefits to me using Vagrant and good CM in my project.)

Vagrant and IPython Notebook have been a potent combination, and I am grateful for the many contributions that you folks have made in making it so great. Thanks for any advice/recommendations you might be able to provide.

Some info on my project is here if you're interested in any of the details:  - the Appendix A notebook is where the details on installation are located:

You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit