Development of (Internet of Things) IoT applications brings a new movement to the functionality of Wireless Sensor Networks (WSNs) from only environment sensing and data gathering to collaborative inferring and ubiquitous intelligence. In intelligent WSNs, nodes collaborate to exchange the information needed to achieve the required inference or smartness. E ciency or correctness of many smart applications relies on the e cient, timely, reliable, and ubiquitous inference of information. In this paper, we introduce the RUbIn framework, which provides a generic solution to such ubiquitous inferences. It brings reliability and ubiquity to inferences using the redundancy characteristic of the gossiping protocols. With RUbIn, the implementation of such inferences and the control of their speed and cost are abstracted by providing developers with a proposed middleware and some dissemination control services. We developed an implementation prototype of the RUbIn framework and a few inference examples of TinyOS. For evaluation, we utilized both the TOSSIM simulator and a testbed of MicaZ motes in various densities and di erent numbers of nodes. Results of the evaluations demonstrated that in all nodes, the inferring time after a change was about a few seconds and the cost of maintenance in stability state was about a few messages sent per hour.