[Tex/LaTex] Minted working from terminal but not Texpad


I'm using the minted package in latex on my mac (running lion). Now when I use the terminal to type

pdflatex -shell-escape My_Ruby_Notes.tex 

it compiles fine and the resultant pdf looks perfect. When I try and typset the exact same document through Texpad (I assume any other IDE also) I just get a load of errors pertaining to the My_Ruby_Notes.out.pyg file. I have set up in preferences to use -shell-escape but this hasn't fixed it. Any ideas? My $PATH is shown below in case this sheds some light on things


All the errors are of the following form

Undefined control sequence. (...err}{\PYZbs{}}\PY{n}{relax}\PY{p}{\PYZpc{}}...)

Below is a minimal working file (working from terminal, not Texpad)

\documentclass[12pt, titlepage]{article}

  string title = "This is a Unicode π in the sky"
  Defined as $\pi=\lim_{n\to\infty}\frac{P_n}{d}$ where $P$ is the perimeter
  of an $n$-sided regular polygon circumscribing a
  circle of diameter $d$.
  const double pi = 3.1415926535


Best Answer

In OS X, GUI applications don't get changes that are made to PATH (or any other environment variables like TEXINPUTS) in .profile or .bashrc. Thus you have to set them so they are available for GUI applications. See this answer for details.

I don't know if that's your problem since you don't specify what the error messages are, but it's quite possible.