lib/lightgbm/ffi.rb in lightgbm-0.1.7 vs lib/lightgbm/ffi.rb in lightgbm-0.1.8

- old
+ new

@@ -3,14 +3,14 @@ extend ::FFI::Library begin ffi_lib LightGBM.ffi_lib rescue LoadError => e - raise e if ENV["LIGHTGBM_DEBUG"] - if e.message.include?("libomp") - raise LoadError, "Could not find OpenMP" + if e.message.include?("Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib") && e.message.include?("Reason: image not found") + raise LoadError, "OpenMP not found. Run `brew install libomp`" + else + raise e end - raise LoadError, "Could not find LightGBM" end # https://github.com/microsoft/LightGBM/blob/master/include/LightGBM/c_api.h # keep same order