I've tried several times to solve this integral, but I am unable to solve it, every time I get a similar wrong answer. The question is "evaluate $$\oint_C \frac{1}{z-i} dz$$ where C is the circle $\left\vert 2 \right\vert$"
Here is my (wrong) solution:
This function is not analytic in $z=i$. This point is part of the circle $\left\vert 2 \right\vert$, so the cauchy's integral theorem does not hold here.
The parametric equation for the curve is:
$$ z(t)=2e^{it} $$ where $0\leq t \leq 2\pi$ and $$ \frac {dz}{dt} = 2ie^{it} $$
and also: $$ f(z(t))=\frac {1}{z(t)-i}=\frac {1}{2e^{it}-i} $$
So: $$ \oint_C f(z(t))\cdot z'(t)dt = \oint\limits_{0}^{2\pi} \frac{2ie^{it}}{2e^{it}-i}dt $$
I used $u=2e^{it}-i$ and $du=2ie^{it}dt$ to solve the integral.
$$ \int\limits_{0}^{2\pi}\frac {du}{u}=Ln(u)=Ln(2e^{it}-i) $$
Now if I substitute $2\pi$ and $0$: $$ Ln(2e^{i(2\pi)}-i) - Ln(2e^{i(0)}-i) = Ln(2-i)-Ln(2-i)=0 $$
But the book says the answer is "$2\pi i$". What's wrong with my solution?

Your issue is that the function $1/u$ does not have a primitive defined on all of $C$. The complex logarithm is typically defined with branch cuts, since $$ e^{2\pi i} = e^{0} ~~ {\rm but } ~~ 2\pi i \neq 0, $$ leading to an ambiguity in the definition of $\log$ at $z=1$ (for example!). To deal with this in the most elementary way, you can separate the integral into real and imaginary parts and attempt to integrate each separately. This process looks like a huge bummer, so instead you can expand the function $f(z)$ into its Laurent series about $z = i$ and apply the residue theorem.
Probably more helpful: you could draw a second circle of unit radius about $z = i$, call it $C_2$. Then by Cauchy's theorem, $$ \int_C f(z) dz = \int_{C-C_2} f(z) dz + \int_{C_2} f(z) dz = \int_{C_2} f(z)dz.$$ That is, traversing $C$ once can be broken up into (i) traversing $C$ starting from $z = 2i$, counterclockwise; (ii) traversing $C_2$ starting at the same point, clockwise (these two steps give a path I labelled $C - C_2$); (iii) traversing $C_2$ again, counterclockwise.
The two trips along $C_2$ cancel out, but by grouping the first two legs of the journey we get a contour which doesn't contain the singularity $z = i$. Cauchy's theorem then implies that the line integral along $C - C_2$ is zero.
Now to evaluate $\int_{C_2} f(z) dz$, we can translate the problem to integrating $1/z$ about the unit circle, $C_0$ (substitute $w = z-i$). This leaves
$$\int_C {1 \over z - i} dz = \int_{C_2} {1\over z - i} dz = \int_{C_0} {dw \over w} = \int_0^{2\pi} {ie^{it} \over e^{it}} dt = i\int_0^{2\pi} dt = 2\pi i.$$
Daniel Fischer's comment is an excellent suggestion. I prefer his solution, but this is what I've got :)