To find it by rolling down an incline, you will have to find someway to measure it's velocity ie time how long it takes to travel 2m or something when it finishes.
But assuming you can do that draw a vector diagram of forces parallel to the plane, ignoring friction.
You will end up with a resultant force being mg*sin θ.
Plugging that in F=ma,
g=a/sin θ
where a can be calulated using a=(v-u)/t
and since u will be 0.
a=v/t.
From there.
g=v/(t*sin θ ).
Where t is the time taken for it to go down the ramp