Skip to content

Commit

Permalink
Re-enable the static-ruby check
Browse files Browse the repository at this point in the history
After a long discussion and a lot of work in #88, we discovered that
there are two issues at play here that are out of our control.

1) Heroku runs it's own custom static-link Ruby which we can't get
working with Rice.

2) Ruby 2.2.2 and on has some serious issues with static linking in
general and there doesn't seem to be any pressure to fix this.

With that, I have to re-enable the static Ruby check so people know when
they are trying to run Rice on a platform that won't support it.
  • Loading branch information
jasonroelofs committed Nov 27, 2015
1 parent a2af953 commit 1e01905
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
#
# With this, installing on any of the Ruby versions installed on a machine is as
# easy as /path/to/the/gem install rice.
#
# This isn't actually an extconf.rb file, all it needs to do is create a Makefile
# for gem to continue 'make'-ing. It needs to be named 'extconf.rb' to fit Rubygem's
# expectations

$:.unshift File.expand_path(File.dirname(__FILE__))

Expand All @@ -22,10 +18,24 @@
other_opts = ""
env = ""

if RbConfig::CONFIG["ENABLE_SHARED"] == "no"
abort <<EOC.chomp
Unfortunately Rice does not build against a staticly linked Ruby.
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-shared" rbenv install [version]
If you are using Heroku, they use a own custom configured, staticly linked Ruby
for their stack and it unfortunately does not work with Rice. You will need to use
a custom Ruby build pack that builds and uses a non-static version of Ruby.
EOC
end

if RUBY_PLATFORM =~ /darwin(\d+)/
# TY Nokogiri!
if !File.exist?('/usr/include/iconv.h')
abort <<'EOM'.chomp
abort <<EOM.chomp
-----
The file "/usr/include/iconv.h" is missing in your build environment,
which means you haven't installed Xcode Command Line Tools properly.
Expand Down

0 comments on commit 1e01905

Please sign in to comment.