I'm looking for a package that can highlight ruby source code in LaTeX. I've found this thread: https://stackoverflow.com/questions/1966425/source-code-highlighting-in-latex
But it is from 2009, and I'm wondering if there is any better solution. I can't get minted to work on my Mac. Maybe someone knows a better, easier solution. I'm currently playing with
\begin{lstlisting}[
label=listing:RubyTest,
float=h,
caption=test.rb,
firstnumber=1,
language=Ruby
]
a = 5
b = a * 5
puts b
puts b + 3
class Test < Test::SomeClass
@test = 3
def bar
if foo
puts "foo"
else
puts "bar
end
end
end
\end{lstlisting}
But it gets only formatted without any colors.

easy_install pygmentson the command line and you should be good to go withminted.