It is exciting to see that there have been new releases of both Truffle & TestRPC. I have been hanging out in the Truffle Gitter channel, and been fielding lots of questions about installation issues on Windows. As Tim has previously blogged, there have been a number of issues with installation. The installation issues were mostly due to compiling C based libraries, and requiring a number of build tools on the local machine. These issues have now been removed as Truffle & TestRPC are both now built, and then released as a completely pre-packaged release. This also means that installation times have dropped from 10 minutes, to 10 seconds! (Which means I’ll need to go back and update some of my old tutorials 🙂)

Highlights: Installs quicker. Reduced memory consumption. Ability to persist the blockchain to disk, meaning you can suspend and then resume if you like (I’ll still be using it mostly as a throw away in memory style dev environment).https://github.com/ethereumjs/testrpc/releases/tag/v4.0.0

Whats next?

I’ve been waiting in suspense for these updated installers to drop for many months now. There have been a couple of projects on my backlog that had been blocked until this came out. A short list of what I’ll be working on in the near term are:

Updated installation documentation (for Windows & Ubuntu)

Video tutorials showing how to install and get started with Truffle & TestRPC

New DevOps tutorials. The easier self contained install makes a couple of scenarios much easier now.

However I have found it is a much nicer experience to use the Windows Subsystem for Linux which provides a native Ubuntu shell with bash, which allows me to run all the Linux tools natively without issues. These install steps will work on an Ubuntu machine as well.

Prerequisite if running on Windows

After following the steps in the guide above. Simply start the Ubuntu bash shell

Install steps

# Takes a clean Ubuntu image, up to being dev ready.# install npm from official repo, as apt-get has a very old version of npmcurl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash –sudo apt-get update -y && sudo apt-get upgrade -y

One of the trickiest things has been trying to get Windows environments correctly configured, as the tools are npm based and want to be compiled natively and assumes it is on a Linux machine. Here is the simplest install script I have found

Step 2. Install the tools via npm:Open a NEW PowerShell prompt as Administrator (to ensure that it reloads )

npm install -g npm

npm install -g –production windows-build-tools

npm install -g ethereumjs-testrpc

npm install -g truffle

You may see some error messages during npm installs. Many of these are just informational / optional components failing. You can test that it is all working by trying to run the commands truffle and testrpc.

Bonus Step: combining with Visual Studio Code
This is how I use Truffle & Visual Studio code together. Make sure you install and configure Visual Studio Code with the Solidity extensions.
If you navigate into the folder where your files are, typing “code .” will open Visual Studio Code in the current folder. Running the command after a truffle init gets you up and running quickly