Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plivo having trouble building on Travis CI #50

Closed
agrberg opened this issue Feb 7, 2017 · 1 comment
Closed

Plivo having trouble building on Travis CI #50

agrberg opened this issue Feb 7, 2017 · 1 comment

Comments

@agrberg
Copy link

agrberg commented Feb 7, 2017

Output from Travis as follows:

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.
@agrberg
Copy link
Author

agrberg commented Feb 17, 2017

Important

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.

@agrberg agrberg closed this as completed Feb 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant