This was a real royal pain in the ass. I encountered a problem where ruby-stylus no longer supported the version of Node that came with the default ruby build pack. Steps below are really only for my own reference, if you’re interested in something more detailed please let me know :)
You’ll need an S3 account,
gem install vulcan, and fork the ruby
Create a bucket on S3 for your binaries. Make sure you use US Standard.
Find the version of node that you want,
0.10.17 wasn’t compiling
for me so I resorted to using
0.9.9 You can view a list here.
Run this to create the Heroku server that will be used to compile your binaries.
lib/language_pack/ruby.rb, look for
NODE_VERSION and put the
appropriate version in.
lib/language_pack/base.rb, look for
VENDOR_URL and put your S3
bucket URL in.
Rakefile, update your
S3_BUCKET_NAME to the bucket you just
created. Make sure that the line that downloads the node package looks
1 2 3 4 5 6 7 8 9 10 11 12
Newer distros of node are all under the URL format above. Again take a look at this link to see if it applies to you.
Grant List and View permissions of your new bucket to everyone (Heroku will need to use this bucket to download binaries.)
We need to make sure that we send the correct AWS credentials when uploading to the bucket:
Finally we can compile node on the Vulcan Heroku App and store it on our S3 account:
Since we are using our new amazon bucket to serve binaries, it will also need to have copies of some of the other binaries:
1 2 3 4 5 6
To use your new build pack run this:
Modifying the build pack seems interesting, there are probably a host of other handy things you can do with it.