You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Installing plivo 0.3.19 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
can't modify frozen String
Gem files will remain installed in
/home/travis/build/our-app/vendor/bundle/ruby/2.3.0/gems/plivo-0.3.19
for inspection.
Results logged to
/home/travis/build/our-app/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0/plivo-0.3.19/gem_make.out
An error occurred while installing plivo (0.3.19), and Bundler cannot
continue.
Make sure that `gem install plivo -v '0.3.19'` succeeds before bundling.
The command "eval bundle install --without production development --path=${BUNDLE_PATH:-vendor/bundle} " failed.
The text was updated successfully, but these errors were encountered:
This is not an issue with Plivo although there are some oddities I will explain below. This is a problem with Rubygems that has been fixed. In our case we needed to run gem update --system before installing the gems on Travis to ensure we had the latest version with the bug fix.
What's going on?
Plivo has a ext/mkrf_conf.rb file which causes bundler to try and build any native extensions thus triggering the issue on old versions of Rubygems. There is a common "hack" where mkrf_conf.rb is used to install different gem dependencies based on your system's Ruby or config. This requires mkrf_conf.rb to output a rakefile with a default task that typically does nothing.
In Plivo's case, this file is only checking for openssl which is a part of the Ruby standard library. This check seems unnecessary but I would appreciate any clarification.
Another red herring I found was s.bindir = 'bin' from the gemspec. While I'm sure it doesn't need to be there as there is no bin directory in Plivo, I'm not sure why it was put there to begin with. Was it just boilerplate or is there another reason?
#51, now closed, does not fix this issue, you have to update Rubygems. However the maintainers should discuss if mkrf_conf.rb is even needed and make the appropriate changes to it and the gemspec to remove the unnecessary directives.
Output from Travis as follows:
The text was updated successfully, but these errors were encountered: