Skip to content

Commit

Permalink
Error and warn users about missing Ruby shared library on install
Browse files Browse the repository at this point in the history
Rice doesn't work linking against libruby.a (static) and I'm not sure
how best to make it work. For now to help document this I'm erroring the
installation early if there's no shared library.
  • Loading branch information
jasonroelofs committed Apr 30, 2013
1 parent 6c735af commit a594b04
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions extconf.rb
Original file line number Diff line number Diff line change
@@ -19,6 +19,17 @@
prefix_dir = File.join(File.dirname(File.expand_path(__FILE__)), "ruby", "lib")
with_ruby = File.join(RbConfig::CONFIG["bindir"], RbConfig::CONFIG["RUBY_INSTALL_NAME"])

if RbConfig::CONFIG["ENABLE_SHARED"] == "no"
raise <<EOC
Unfortunately Rice does not work against a Ruby without any shared libraries.
You'll need to rebuild Ruby with --enable-shared to use this library.
If you're on rvm: rvm reinstall [version] -- --enable-shared
If you're on rbenv: CONFIGURE_OPTS="--enable-shard" rbenv install [version]
If this is a host environment like Heroku you'll need to contact their support.
EOC
end

other_opts = ""
env = ""

0 comments on commit a594b04

Please sign in to comment.