We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf109ef commit 9decd3aCopy full SHA for 9decd3a
spec/support/execute_ruby.rb
@@ -4,11 +4,17 @@
4
module PyCall
5
module RSpecHelper
6
module ExecuteRuby
7
+ RUBYLIB = ENV["RUBYLIB"]
8
+
9
def ruby(script)
- Open3.capture3(ruby_path, stdin_data: <<SCRIPT)
10
+ child_env = {}
11
+ base_dir = File.expand_path("../../..", __FILE__)
12
+ lib_dir = File.join(base_dir, "lib")
13
+ ext_dir = File.join(base_dir, "ext/pycall")
14
+ child_env["RUBYLIB"] = [lib_dir, ext_dir, RUBYLIB].join(File::PATH_SEPARATOR)
15
+ Open3.capture3(child_env, ruby_path, stdin_data: <<SCRIPT)
16
require 'bundler'
17
Bundler.setup
-$LOAD_PATH.unshift "#{File.expand_path('../../../lib', __FILE__)}"
18
19
#{script}
20
SCRIPT
0 commit comments