Ran into an issue recently where I was trying to install gitorious on a local RHEL5 system. The site would crash every time I tried to view a repo with the error:

ruby: symbol lookup error: /usr/lib64/ruby/gems/1.8/gems/rdiscount-1.3.1.1/lib/rdiscount.so: undefined symbol: RSTRING_LEN

The solution ended up being the following – In the file /usr/lib64/ruby/1.8/x86_64-linux/ruby.h ( note I’m running on 64bit, on 32bit it’d be /usr/lib/ruby/1.8/i386-linux/ ), add these lines somewhere near the top:

#define RSTRING_LEN(s) (RSTRING(s)->len)
#define RSTRING_PTR(s) (RSTRING(s)->ptr)

After that, uninstall and reinstall rdiscount

gem uninstall rdiscount
gem install rdiscount -v 1.3.1.1

And you should be good to go.

This entry was posted in Unix, Work and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Browse by Topic