find something small to learn on, say a foot tall or so, preferably with out a drop the other side so you dont worry about messing t up.
you could consider options with two approaches in mind:
1. that the bike is stationary before you make the move to get up
2. that the bike is in motion
Which you choose depends on confidence, skill and obviously which one is more appropriate.
Generally speaking, it is easier to be moving to get up sopmething becayse you use the momentum to your advantage, eg rolling towards ledge head on, front wheel up, then throw your weight over the bars and allow the back to come up.
Theres many ways to get up however theyll be deifned by either starting stationary or when youre rolling.
Rolling may not be easiest though.
Try getting the front wheel up, and using little side hops to shift the bike around so your almost horizontal to the ledge, with the front wheel up it, then with the brakes on throw your weight forwards again and let the back come up and sideways a bit.