Imagine a transportation system in which passengers simply get on/off without any explicit ticketing operation. Yet, the system tracks usage and charges passengers. Such a system will not only be more convenient and efficient, but also be more conducive for analytics, than existing systems. Towards that goal, we exploit the opportunity that people are carrying sensor-equipped smart devices, and their motion trajectories/patterns and experienced environment can be measured continuously. Assuming that vehicles are also equipped with such sensors (perhaps fixed devices or smart devices carried by drivers), the vehicles' motion and the experienced environment characteristics can also be recorded and uploaded to cloud. Under these assumptions, we hypothesize that the motion/environment sensed by a passenger's smart device correlates strongly with that of the vehicle she is traveling in and is distinct from that of other vehicles and/or other traces of the same vehicle. In this paper, we expand on this intuition and develop a system, called RideSense, that matches a passenger's sensor trace against the traces of buses in that area, to determine which bus, when she has taken and where she gets on/off. Our evaluation of RideSense, with 20+ hours of traces from 5 bus lines in our area, shows that it achieves an accuracy of 84∼98%, depending on the choice of sensors and their features, positions of the passengers' phones and the metrics of measurement. These results, while far from conclusive, offer confidence that ticketless public transportation may indeed be a possibility in smart cities of the future.