1

My app uses a gem (pygments.rb) for syntax highlighting which requires access to pygments lib. I cant get it to work on heroku as Python is not part of the rails build pack.

Any help/ link on how to link pygments?

Thanks

P.S. I've looked at TrevorTurk's method but looks like its made for albino rather than pygments.rb

Nav
  • 1,185
  • 16
  • 23
  • Here's what the nice folks at Heroku suggest "Your best bet is to vendor it (lib) inside of your app's repository and reference it's local install." and "Basically you would need to commit the needed libraries to your project repo so they get deployed with your app. You would also probably need to either vendor a custom version of the gem or install from a forked version so you can specify the location of the library within the gem code." – Nav Jan 03 '12 at 01:25

1 Answers1

2

Does anyone know better method to check that we're on heroku?

if ENV['HOME'] == '/app'
    require 'rubypython'
    RubyPython.start(:python_exe => "python2.6")
end

I found the solution from the link below.

cHao
  • 84,970
  • 20
  • 145
  • 172
Lookchin
  • 478
  • 4
  • 7