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.
pull/10019/head
DJ Mountney 8 years ago
parent 32f32ea0b2
commit 37268d0526
  1. 2
      grpc.gemspec
  2. 2
      templates/grpc.gemspec.template

@ -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'

@ -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'

Loading…
Cancel
Save