diff --git a/lib/index.js b/lib/index.js index 06b1d2f9..1cce8432 100644 --- a/lib/index.js +++ b/lib/index.js @@ -155,6 +155,12 @@ var Embark = { var web3Endpoint = 'http://' + self.config.blockchainConfig.rpcHost + ':' + self.config.blockchainConfig.rpcPort; web3.setProvider(new web3.providers.HttpProvider(web3Endpoint)); + if (!web3.isConnected()) { + console.log(("Couldn't connect to " + web3Endpoint.underline + " are you sure it's on?").red); + console.log("make sure you have an ethereum node or simulator running. e.g 'embark blockchain'".magenta); + exit(); + } + var deploy = new Deploy(web3, contractsManager, Embark.logger); deploy.deployAll(function() { callback(null, contractsManager);