Installing Rockstack On Mac

Dec 3, 2013 OS X


Rockstack is a developer environment (DevEnv) tool that makes installing and managing code bases extremely easy. At my new position, we use the tool frequently to reduce the headache and time to maintain code. A rock project could be any type of code with the addition of a .rock.yml file which contains specifics for running your code. It works with PHP, Node, Perl, Ruby and Python.

Some of the benefits include the ability to manage your composer dependencies or launch a test server.

Installing Rock

Before you continue, make sure you have homebrew installed.

Download the rockstack brew taps and Formula’s:

bash -c "$(curl -fsSL"

Then install a runtime (or multiple) of your choice:

brew install rock-runtime-php55

Setting Your Environment

To prevent conflicts with binary names, if you install PHP, you will not be able to execute it from your existing $PATH. You will need to run:

eval $(rock --runtime=<runtime> env)


eval $(rock --runtime=php55 env)

Now when you run php -i you will get your PHP info output.

Example .rock.yml

This .rock.yml file will set the runtime to php55, use composer to install and update packages and listen on a local HTTP socket of your choice to test locally. The directory structure for this example is as follows:

    |--- .rock.yml
    |--- bootstrap.php
    |--- web/
          |--- index.php

You can stick something basic into index.php.



    exec composer install -v

    exec composer selfupdate && composer update -v

    exec php -S "${HTTP_HOST-}:${HTTP_PORT-80}" -t "web"

    exec php -S "${HTTP_HOST-}:${HTTP_PORT-8000}" -t "web" &

    kill -9 $(ps aux | grep "php -S" | grep -v "grep" | awk -F" " '{print $2}')


include_once 'vendor/autoload.php';

echo "My First Rock App";


include_once '../bootstrap.php';


These basic steps will get rock running in your Mac with a basic config.

Gotcha’s With Rock perl516

I had an issue installing rock-runtime-perl516. I would get the following:

% brew install rock-runtime-perl516
==> Downloading
Already downloaded: /Library/Caches/Homebrew/rock-runtime-perl516-5.16.3.tar.bz2
==> ./Configure -des -Dprefix=/usr/local/Cellar/rock-runtime-perl516/5.16.3 -Dvendorprefix=/usr/local/Cellar/rock-runtime-perl516/5.16.3 -Dsiteprefix=/usr/local/
==> make
==> make install
==> curl -LO
==> tar -xzf local-lib-1.008009.tar.gz
==> perl Makefile.PL
==> make install
==> curl -Lo /usr/local/Cellar/rock-runtime-perl516/5.16.3/bin/cpanm
==> chmod 755 /usr/local/Cellar/rock-runtime-perl516/5.16.3/bin/cpanm
==> cpanm -l local
tar: Error exit delayed from previous errors.
! Failed to unpack App-cpanminus-1.7001.tar.gz: no directory
! Failed to fetch distribution App-cpanminus-1.7001
! Bailing out the installation for carton-v0.9.10. Retry with --prompt or --force.
12 distributions installed

If reporting this issue please do so at (not mxcl/homebrew):

If you look at the formula for brew, it says CPANM version of 1.6008 will be used, but there’s and issue with extracting version 1.7001.

To correct this, you can do:

% cpan App::cpanminus
% cpanm -l local \ \

And then when you re-run brew install rock-runtime-perl516, it will execute successfully.

comments powered by Disqus