This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add this patch to application.rb after `require 'rails/all'` | |
# see https://github.com/rails/rails/issues/55578 for more details | |
if ENV['BAZEL_TEST'] | |
# This patch is necessary so that Rails.root is resolved within the symlink sandbox. | |
# We avoid use of caller_locations absolute_path since it is not the absolute path | |
# but rather the realpath, which escapes the symlink sandbox and causes errors during | |
# test run time. | |
# We make a similar change in find_root_with_flag to avoid the use of `realpath` for | |
# the same reason. |