Skip to content

Commit d328fdd

Browse files
authored
Merge pull request #13 from MaineC/fix-gem-build
Gem installation fails on Linux
2 parents 933c94b + cf69596 commit d328fdd

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

README.rdoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,16 @@ while binaries for libxslt and libexslt areprovided in the
4444
libxslt-ruby bindings.
4545

4646

47+
Installation from source:
48+
49+
ruby ext/libxslt/extconf.rb
50+
make
51+
sudo make install
52+
53+
gem build libxslt-ruby.gemspec
54+
gem install libxslt-ruby-1.1.1.gem
55+
56+
4757
== USAGE
4858

4959
For in-depth information about using libxslt-ruby please refer

ext/libxslt/extconf.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,12 @@ def crash(str)
126126

127127
RUBY_VERSION =~ /(\d+.\d+)/
128128
minor_version = $1
129-
paths = ["#{gem_spec.full_gem_path}/lib",
129+
paths = ["#{gem_spec.full_gem_path}/lib",
130130
"#{gem_spec.full_gem_path}/lib/#{minor_version}",
131131
"#{gem_spec.full_gem_path}/ext/libxml"]
132132

133133
# No need to link xml_ruby on OS X
134-
unless RbConfig::CONFIG['host_os'].match(/darwin/)
134+
unless RbConfig::CONFIG['host_os'].match(/darwin|linux/)
135135
# Hack to make sure ruby library is *after* xml_ruby library
136136
$LIBS = "#{$LIBRUBYARG_STATIC} #{$LIBS}"
137137

libxslt-ruby.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# encoding: utf-8
2+
require 'date'
23

34
# Determine the current version of the software
45
version = File.read('ext/libxslt/version.h').match(/\s*RUBY_LIBXSLT_VERSION\s*['"](\d.+)['"]/)[1]

0 commit comments

Comments
 (0)