-
Notifications
You must be signed in to change notification settings - Fork 69
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
Bundler 0.14 breaks 2.2.1 build #48
Comments
I can confirm this bug. Tested it locally with ruby240, bundler 1.13.7 works, 1.14.0 produces this error. |
Just got this on my recent TravisCI build. It may be worth noting this works fine on Ruby < 2.3 since those do not have frozen strings. |
The cause is from rubygems. It has been fixed already. I think the problem is solved by |
Can confirm |
Currently, builds are failing on Travis CI. e.g.) https://travis-ci.org/bbatsov/rubocop/jobs/194136460 The cause is from rubygems, and it has been fixed. See also. ku1ik/rainbow#48 Note ------ Builds seem to be failing for different reason in JRuby. https://travis-ci.org/bbatsov/rubocop/jobs/194136459 This change hasn't fixed the problem.
As of bundler 1.14.0 installing rainbow gem fails due sto bug in rubygems that was fixed. For details see rainbow issue discussion: ku1ik/rainbow#48 (comment)
Currently, builds are failing on Travis CI. e.g.) https://travis-ci.org/bbatsov/rubocop/jobs/194136460 The cause is from rubygems, and it has been fixed. See also. ku1ik/rainbow#48 Note ------ Builds seem to be failing for different reason in JRuby. https://travis-ci.org/bbatsov/rubocop/jobs/194136459 This change hasn't fixed the problem.
Error `can't modify frozen String` See ku1ik/rainbow#48
@wintersolutions Perhaps you can update the Description textarea with the |
The change in the Dockerfile is motivated by this issue and it's suggested workaround: ku1ik/rainbow#48 I generated the docs outside of docker because the rake task doesn't currently work inside docker. I think that's fine. The `Registry` change is to maintain parity with an internal RuboCop refactoring that took place as part of this update.
If use bundler 1.14.4 with rubygems 2.6.8 and `Bundler.settings["build.#{spec.name}"]` returns `nil` then we get error "can't modify frozen literal string" from rubygems[1]. RubyGems 2.6.8 is the default version for Ruby2.4.0. [1]: https://github.com/rubygems/rubygems/blob/v2.6.8/lib/rubygems/ext/rake_builder.rb#L13 See also ku1ik/rainbow#48
This fixes weird bug with rainbow: ku1ik/rainbow#48
…gems-2.6.8, r=segiddins Use empty array when `spec_settings` returns `nil` If use bundler 1.14.4 with rubygems 2.6.8 and `Bundler.settings["build.#{spec.name}"]` returns `nil` then we get error "can't modify frozen literal string" from [rubygems](https://github.com/rubygems/rubygems/blob/v2.6.8/lib/rubygems/ext/rake_builder.rb#L13). RubyGems 2.6.8 is the default version for Ruby2.4.0. See also ku1ik/rainbow#48
tracking of issue here: ku1ik/rainbow#48
…gems-2.6.8, r=segiddins Use empty array when `spec_settings` returns `nil` If use bundler 1.14.4 with rubygems 2.6.8 and `Bundler.settings["build.#{spec.name}"]` returns `nil` then we get error "can't modify frozen literal string" from [rubygems](https://github.com/rubygems/rubygems/blob/v2.6.8/lib/rubygems/ext/rake_builder.rb#L13). RubyGems 2.6.8 is the default version for Ruby2.4.0. See also ku1ik/rainbow#48 (cherry picked from commit ea4926a)
For people having issues with 2.2.1 I offer the following workaround: group :workaround do
gem 'rainbow', '~>2.0', '!=2.2.1'
end I offer this for those who would workaround rainbow rather bundler. |
Travis fails with the combination of bundler 1.7.6 and rubygems 2.6, as they are not compatible: NoMethodError: undefined method `spec' for nil:NilClass This commit removes the `gem update --system` since we are no longer installing a particular version of bundler. The thinking is that Travis provides consistent versions of rubygems and bundler in all supported ruby versions that we support. This commit also pins rainbox, as newer versions are not compatible[1] with ruby 2.4 and bundler 1.14.0, leading to errors like: Gem::Ext::BuildError: ERROR: Failed to build gem native extension. [1] ku1ik/rainbow#48
Travis fails with the combination of bundler 1.7.6 and rubygems 2.6, as they are not compatible: NoMethodError: undefined method `spec' for nil:NilClass This commit removes the `gem update --system` since we are no longer installing a particular version of bundler. The thinking is that Travis provides consistent versions of rubygems and bundler in all supported ruby versions that we support. This commit also pins rainbow, as newer versions are not compatible[1] with ruby 2.4 and bundler 1.14.0, leading to errors like: Gem::Ext::BuildError: ERROR: Failed to build gem native extension. [1] ku1ik/rainbow#48
Travis fails with the combination of bundler 1.7.6 and rubygems 2.6, as they are not compatible: NoMethodError: undefined method `spec' for nil:NilClass This commit removes the `gem update --system` since we are no longer installing a particular version of bundler. The thinking is that Travis provides consistent versions of rubygems and bundler in all supported ruby versions that we support. This commit also pins rainbow, as newer versions are not compatible[1] with ruby 2.4 and bundler 1.14.0, leading to errors like: Gem::Ext::BuildError: ERROR: Failed to build gem native extension. [1] ku1ik/rainbow#48
I've just released 3.0 to rubygems. This new version doesn't have native exts / rake dependency, so if you're on Ruby 2.1+ then you can try it out. |
@wintersolutions Does 3.0 solve your issues? |
@olleolleolle It does, thanks to all of you! |
When another project depends on puppet and references it using `git` or `path` in its Gemfile, then bundler will load puppet's .gemspec. As such the following dependencies are not needed. * Drop net-ssh * Drop hocon When building puppet as a gem using project_data.yaml: * Add missing httpclient required dependency * Bump ffi to >= 1.9.25, < 1.10 When running via bundler using Gemfile: * Drop conditional ruby version logic for rubocop * Relax rubocop constraint to allow y component to float. * Unpin transitive rainbow dependency as the original problem[1] was resolved in rainbow 3.0 (which requires ruby >= 2.1) * Delete outdated mocha comment * Add optional hocon dependency [1] ku1ik/rainbow#48
When another project depends on puppet and references it using `git` or `path` in its Gemfile, then bundler will load puppet's .gemspec. As such the following dependencies are not needed. * Drop net-ssh * Drop hocon When building puppet as a gem using project_data.yaml: * Add missing httpclient required dependency * Bump ffi to >= 1.9.25, < 1.10 When running via bundler using Gemfile: * Drop conditional ruby version logic for rubocop * Relax rubocop constraint to allow y component to float. * Unpin transitive rainbow dependency as the original problem[1] was resolved in rainbow 3.0 (which requires ruby >= 2.1) * Delete outdated mocha comment * Add optional hocon dependency [1] ku1ik/rainbow#48
"can't modify frozen String" error due to ku1ik/rainbow#48
…gems-2.6.8, r=segiddins Use empty array when `spec_settings` returns `nil` If use bundler 1.14.4 with rubygems 2.6.8 and `Bundler.settings["build.#{spec.name}"]` returns `nil` then we get error "can't modify frozen literal string" from [rubygems](https://github.com/rubygems/rubygems/blob/v2.6.8/lib/rubygems/ext/rake_builder.rb#L13). RubyGems 2.6.8 is the default version for Ruby2.4.0. See also ku1ik/rainbow#48
* Use older version of bundler for jruby builds The jruby build started failing when Travis started using bundler version 1.14.3. It all worked on 1.13.7 so I'm switching back to that version when a jruby build is detected. [1] https://travis-ci.org/brigade/overcommit/jobs/194979683 [2] https://travis-ci.org/brigade/overcommit/jobs/189188271 * Pre-install rainbow to work around bundler issues on jruby Installing rainbow manually before doing bundle install helped fix the build locally for me. * Apply workaround for failing rainbow install I think I've found an issue describing the issues we've seen with the jruby build: ku1ik/rainbow#48 A workaround that people have applied is to run `gem update --system` as a before_install hook. I'm giving that a try. * Only apply gem update workaround for jruby The workaround added in the previous commit seems to be working, but only for the jruby build. We can conditionally apply it to prevent failing builds for other ruby versions.
Workaround
Suggested solutions for people encountering this problem at the moment:
gem update --system
or locking down rainbow to 2.1.x in your Gemfile.Original description:
The new bundler version 0.14 exits with the following message:
Downgrading to previous bundler version 1.13.7 is a workaround.
The text was updated successfully, but these errors were encountered: