diff options
author | DJ Mountney <david@twkie.net> | 2017-03-07 09:22:04 -0800 |
---|---|---|
committer | DJ Mountney <david@twkie.net> | 2017-03-10 15:55:52 -0800 |
commit | 37268d0526036fcd29a319932f734a53ee35ae34 (patch) | |
tree | 90b65ae822e70a75ba797a5706f7be45b6d55e1d | |
parent | 32f32ea0b2249b03514fbc1c4fb4604440bef22b (diff) |
Fix for using gem build/install
When pre-compiled assets are missing for the current platform, and you run gem install, the compiled native extensions are placed in the first require paths folder. This differs from rake-compiler task, where they are always placed in lib.
Setting the lib path as the first require path will ensure the compiled library is placed in the correct folder.
-rwxr-xr-x | grpc.gemspec | 2 | ||||
-rw-r--r-- | templates/grpc.gemspec.template | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/grpc.gemspec b/grpc.gemspec index 8d5b7b2ab1..1d2ee0725a 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -24,7 +24,7 @@ Gem::Specification.new do |s| s.files += Dir.glob('include/grpc/**/*') s.test_files = Dir.glob('src/ruby/spec/**/*') s.bindir = 'src/ruby/bin' - s.require_paths = %w( src/ruby/bin src/ruby/lib src/ruby/pb ) + s.require_paths = %w( src/ruby/lib src/ruby/bin src/ruby/pb ) s.platform = Gem::Platform::RUBY s.add_dependency 'google-protobuf', '~> 3.1' diff --git a/templates/grpc.gemspec.template b/templates/grpc.gemspec.template index 462ea52614..80ce643d80 100644 --- a/templates/grpc.gemspec.template +++ b/templates/grpc.gemspec.template @@ -26,7 +26,7 @@ s.files += Dir.glob('include/grpc/**/*') s.test_files = Dir.glob('src/ruby/spec/**/*') s.bindir = 'src/ruby/bin' - s.require_paths = %w( src/ruby/bin src/ruby/lib src/ruby/pb ) + s.require_paths = %w( src/ruby/lib src/ruby/bin src/ruby/pb ) s.platform = Gem::Platform::RUBY s.add_dependency 'google-protobuf', '~> 3.1' |