4

I installed Phabricator for working with Python projects. Everything is ok, but files view present them, as plain text. I want to some highlighting provided by Pygmentize utility.

I have installed Pygments

sudo pip install Pygments

Checked from all users, pygmentize script is available, and located at /usr/local/bin. I changed

'pygments.enabled' => true,

settings in myconfig.conf.php file of phabricator. But it's not working ?! I can't find any log crashes, or something else. Have you any ideas why it can happen?

Rustem
  • 2,884
  • 1
  • 17
  • 32

2 Answers2

5

I received answer from Github-Issues service. The reason was that httpd user can't call this function, here is sample which extends own $PATH enviroment. I added this to myconfig.conf.php file:

'environment.append-paths' => array('/usr/local/bin'),

It is strongly recommended to add path with pygmentize to your path.

Rustem
  • 2,884
  • 1
  • 17
  • 32
0

config file located at:

phabricator/conf/local/local.json

I have add in my config

"environment.append-paths": ["\/bin","\/usr\/bin","\/usr\/local\/bin","\/usr\/local\/sbin","\/usr\/local\/bin","\/opt\/local\/sbin","\/opt\/local\/bin","\/usr\/sbin","\/usr\/bin","\/sbin"],

I am using SmartOS ($PATH locates in /usr/local/sbin:/usr/local/bin:/opt/local/sbin:/opt/local/bin:/usr/sbin:/usr/bin:/sbin)

xakru
  • 269
  • 2
  • 4