Bazelify ruby runtime (#10525)

This uses https://github.com/protocolbuffers/rules_ruby to fully Bazelify our ruby runtime code.  The Rakefile is left in place for now and is still used by our aarch64 tests.  With the current implementation ruby behaves similarly to our python wrapper, which selects whatever version is installed in the system.  Future enhancements will allow for more hermetic builds via Bazel flags to pin a specific version

Closes #10525

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/10525 from mkruskal-google:rules_ruby 97fa1f70abea77ed9792e88f77ce605c971f4871
PiperOrigin-RevId: 499283908
diff --git a/WORKSPACE b/WORKSPACE
index b10e0d0..36d4ee5 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -60,6 +60,9 @@
 load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
 rules_pkg_dependencies()
 
+load("@build_bazel_rules_apple//apple:repositories.bzl", "apple_rules_dependencies")
+apple_rules_dependencies()
+
 # For `kt_jvm_library`
 load("@io_bazel_rules_kotlin//kotlin:repositories.bzl", "kotlin_repositories")
 kotlin_repositories()
@@ -67,6 +70,17 @@
 load("@io_bazel_rules_kotlin//kotlin:core.bzl", "kt_register_toolchains")
 kt_register_toolchains()
 
+load("@rules_ruby//ruby:defs.bzl", "ruby_runtime")
+ruby_runtime("system_ruby")
+register_toolchains("@system_ruby//:toolchain")
+
+load("@system_ruby//:bundle.bzl", "ruby_bundle")
+ruby_bundle(
+    name = "protobuf_bundle",
+    srcs = ["//ruby:google-protobuf.gemspec"],
+    gemfile = "//ruby:Gemfile",
+)
+
 load("@upb//bazel:workspace_deps.bzl", "upb_deps")
 upb_deps()