diff --git a/srcpkgs/ruby/template b/srcpkgs/ruby/template
index 6264553db0..2a1b19e39d 100644
--- a/srcpkgs/ruby/template
+++ b/srcpkgs/ruby/template
@@ -26,6 +26,8 @@ fi
 pre_build() {
 	# Force getaddrinfo detection.
 	sed -e 's,\(checking_for("wide getaddrinfo") {try_\)run,\1link,' -i ext/socket/extconf.rb
+	# Hack for cross-builds.
+	touch ext/ripper/check
 }
 post_install() {
 	# Remove references to the cross compiler