tmm1/pygments.rb — Issue #10: Lib.so issues when calling Pygments::Lexer
Author: nextpulse
Created: 2011-10-22 21:25:21+00:00
State: open

When running the Pyagments::Lexer class (as shown below) it complains about the lib.so file not being found. As the issue seemed similar to #7 I've tried following the steps there but this did not resolve the issue, the output below also contains an attempt at using the RubyPython configuration but neither the options 'python' nor 'python2' seem to help (which makes sense as python is available under the 'python' alias rather than python2).

```ruby-1.9.2-p290 :001 > RubyPython.configure :python_exe => 'python'
=> {:python_exe=>"python"}
ruby-1.9.2-p290 :002 > Pygments::Lexer[:bash]
LoadError: Could not open library 'lib.so': lib.so: cannot open shared object file: No such file or directory
from /home/ruby/.rvm/gems/ruby-1.9.2-p290@gitlab/gems/ffi-1.0.10/lib/ffi/library.rb:121:in `block in ffi_lib'
from /home/ruby/.rvm/gems/ruby-1.9.2-p290@gitlab/gems/ffi-1.0.10/lib/ffi/library.rb:88:in `map'
from /home/ruby/.rvm/gems/ruby-1.9.2-p290@gitlab/gems/ffi-1.0.10/lib/ffi/library.rb:88:in `ffi_lib'
from /home/ruby/.rvm/gems/ruby-1.9.2-p290@gitlab/gems/rubypython-0.5.2/lib/rubypython/python.rb:29:in `'
from /home/ruby/.rvm/gems/ruby-1.9.2-p290@gitlab/gems/rubypython-0.5.2/lib/rubypython/python.rb:21:in `'
from /home/ruby/.rvm/gems/ruby-1.9.2-p290@gitlab/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in `load'
from /home/ruby/.rvm/gems/ruby-1.9.2-p290@gitlab/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in `block in load'
from /home/ruby/.rvm/gems/ruby-1.9.2-p290@gitlab/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `block in load_dependency'
from /home/ruby/.rvm/gems/ruby-1.9.2-p290@gitlab/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:640:in `new_constants_in'
from /home/ruby/.rvm/gems/ruby-1.9.2-p290@gitlab/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `load_dependency'
from /home/ruby/.rvm/gems/ruby-1.9.2-p290@gitlab/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in `load'
from /home/ruby/.rvm/gems/ruby-1.9.2-p290@gitlab/gems/rubypython-0.5.2/lib/rubypython.rb:261:in `reload_library'
from /home/ruby/.rvm/gems/ruby-1.9.2-p290@gitlab/gems/rubypython-0.5.2/lib/rubypython.rb:104:in `start'
from /home/ruby/.rvm/gems/ruby-1.9.2-p290@gitlab/gems/pygments.rb-0.2.3/lib/pygments/ffi.rb:8:in `start'
from /home/ruby/.rvm/gems/ruby-1.9.2-p290@gitlab/gems/pygments.rb-0.2.3/lib/pygments/ffi.rb:42:in `lexers'
from /home/ruby/.rvm/gems/ruby-1.9.2-p290@gitlab/gems/pygments.rb-0.2.3/lib/pygments/lexer.rb:147:in `'
from /home/ruby/.rvm/gems/ruby-1.9.2-p290@gitlab/gems/pygments.rb-0.2.3/lib/pygments/lexer.rb:1:in `'
from (irb):2
from /home/ruby/.rvm/gems/ruby-1.9.2-p290@gitlab/gems/railties-3.1.0/lib/rails/commands/console.rb:45:in `start'
from /home/ruby/.rvm/gems/ruby-1.9.2-p290@gitlab/gems/railties-3.1.0/lib/rails/commands/console.rb:8:in `start'
from /home/ruby/.rvm/gems/ruby-1.9.2-p290@gitlab/gems/railties-3.1.0/lib/rails/commands.rb:40:in `'
from script/rails:6:in `require'
from script/rails:6:in `

'
```

This is on a machine with Debian 6 x64 with ia32 libs installed, Python 2.6.6 and Ruby 1.9.2. I suppose this should just be able to run or am I overlooking another requirement? Thanks in advance either way.