RushHour board game - Cubes pass through others

Hi, this is the game I am coding right now: http://membre.oricom.ca/rdionne/rage_hour/rage_hour.html

I have put box collider and rigidbody on each cube.
I am wondering what is the best solution (collision, raycasting, etc) to avoid cube passing through others.
I have tried the DontPassThroughThings script and it doesnt work.

Thank!

in this case I would keep track of all the cubes positions and check manually (not use physics at all).
You can represent your board as a 2D array. As a box moves, you update the array. For example, 0 can mean the spot is empty, > 0 that the spot is occupied.