Memristive devices have emerged as compact nonvolatile memory elements which can be used as synapses in neuromorphic architectures. However, the intrinsic stochasticity in their switching behavior, non-linear characteristics, and variability limit their operation in real systems. In this paper we propose spike-based learning circuits designed to exploit the stochastic properties of memristors. This implements a probabilistic version of a local gradient descent rule, namely the delta rule, for online learning in neuromorphic chips. The circuits proposed translate the delta error to the slope of a ramp voltage which modulates the probability of resistive switching in very low resolution (i.e. binary) memristive devices. We demonstrate the feasibility and computational power of such approach, using a spiking neural network simulator to carry out system level behavioral simulations of the neuromorphic architecture applied to a classification task of digits 0 to 4 in the MNIST data-set.