# org-mode source code block using minted doesn't indent exported ruby correctly

I am using org-mode to make a Beamer LaTeX presentation, which then gets rendered to PDF.

Here is the part I am having trouble with:

* Vectors in Ruby (components)
- a Vector can be added to another vector
- a Vector can be multiplied by a scalar
#+begin_src ruby
class Vector
def +(vector)
Vector.new(components.zip(vector.components).map {|(vi,wi)| vi+wi })
end

def *(scalar)
Vector.new(components.map{|c| scalar*c })
end
end
#+end_src


When I run org-export-dispatch and render to PDF, here's what the methods look like:

I checked in the intermediate .tex file and the Vector lines have a tab indentation instead of space. It is inside a \begin{minted} block.

How can I fix this indentation?

In order to ensure that source code formatting is preserved in exports from Org-mode, set the variables org-src-preserve-indentation to 't', and indent-tabs-mode to 'nil' using customize-variable.