You are here
Home > IT > 0-run-tests.sh `require’: cannot load such file — aws-xray-sdk/lambda (LoadError)

0-run-tests.sh `require’: cannot load such file — aws-xray-sdk/lambda (LoadError)

手っ取り早く解決する方法

#!/bin/bash
set -eo pipefail
if [ ! -d lib ]; then
  echo "Installing libraries..."
  ./2-build-layer.sh
fi
#GEM_PATH=lib/ruby/2.5.0
GEM_PATH=lib/ruby/2.7.0
ruby function/lambda_function.test.rb

exportつける。

#!/bin/bash
set -eo pipefail
if [ ! -d lib ]; then
  echo "Installing libraries..."
  ./2-build-layer.sh
fi
#GEM_PATH=lib/ruby/2.5.0
export GEM_PATH=lib/ruby/2.7.0
ruby function/lambda_function.test.rb

コメントを残す

Top