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

Bundler 0.14 breaks 2.2.1 build #48

Closed
wintersolutions opened this issue Jan 21, 2017 · 10 comments · Fixed by mzp/fumifumi#46
Closed

Bundler 0.14 breaks 2.2.1 build #48

wintersolutions opened this issue Jan 21, 2017 · 10 comments · Fixed by mzp/fumifumi#46

Comments

@wintersolutions
Copy link

wintersolutions commented Jan 21, 2017

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:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    can't modify frozen String

Downgrading to previous bundler version 1.13.7 is a workaround.

@bastelfreak
Copy link

I can confirm this bug. Tested it locally with ruby240, bundler 1.13.7 works, 1.14.0 produces this error.

@mschuchard
Copy link

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.

@pocke
Copy link
Contributor

pocke commented Jan 21, 2017

The cause is from rubygems.

rubygems/rubygems@4c3b832

It has been fixed already. I think the problem is solved by gem update --system (However I haven't been try it yet. )

@wintersolutions
Copy link
Author

Can confirm gem update --system fixes the issue. Thanks!

weppos added a commit to weppos/publicsuffix-ruby that referenced this issue Jan 22, 2017
pocke added a commit to pocke/rubocop that referenced this issue Jan 22, 2017
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.
gchan added a commit to gchan/password_blocklist that referenced this issue Jan 22, 2017
gchan added a commit to gchan/password_blocklist that referenced this issue Jan 22, 2017
gchan added a commit to gchan/password_blocklist that referenced this issue Jan 22, 2017
gchan added a commit to gchan/password_blocklist that referenced this issue Jan 22, 2017
ixti added a commit to httprb/http that referenced this issue Jan 22, 2017
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)
bbatsov pushed a commit to rubocop/rubocop that referenced this issue Jan 22, 2017
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.
hoshinotsuyoshi added a commit to hoshinotsuyoshi/s3_explorer that referenced this issue Jan 22, 2017
ShockwaveNN added a commit to ONLYOFFICE/ooxml_parser that referenced this issue Jan 23, 2017
Error `can't modify frozen String`
See
ku1ik/rainbow#48
kyrylo added a commit to airbrake/airbrake that referenced this issue Jan 23, 2017
kyrylo added a commit to airbrake/airbrake that referenced this issue Jan 23, 2017
kyrylo added a commit to airbrake/airbrake that referenced this issue Jan 23, 2017
pointlessone added a commit to prawnpdf/prawn that referenced this issue Jan 23, 2017
kyrylo added a commit to airbrake/airbrake that referenced this issue Jan 23, 2017
@olleolleolle
Copy link
Collaborator

@wintersolutions Perhaps you can update the Description textarea with the gem update --system? Can this be closed after that?

kyrylo added a commit to airbrake/airbrake that referenced this issue Jan 23, 2017
maxjacobson added a commit to codeclimate/codeclimate-rubocop that referenced this issue Feb 13, 2017
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.
okkez added a commit to bm-sms/daimon-news that referenced this issue Feb 16, 2017
okkez added a commit to okkez/bundler that referenced this issue Feb 16, 2017
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
ab added a commit to rest-client/rest-client that referenced this issue Feb 19, 2017
This fixes weird bug with rainbow:
ku1ik/rainbow#48
kamui added a commit to kamui/retriable that referenced this issue Feb 19, 2017
tu1ly pushed a commit to apiaryio/apiary-client that referenced this issue Feb 20, 2017
bundlerbot added a commit to rubygems/bundler that referenced this issue Feb 21, 2017
…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
stevenosloan added a commit to slack-notifier/slack-notifier that referenced this issue Feb 21, 2017
daveallie added a commit to daveallie/entangler that referenced this issue Feb 21, 2017
segiddins pushed a commit to rubygems/bundler that referenced this issue Feb 22, 2017
…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)
@philoserf
Copy link

philoserf commented Feb 26, 2017

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.

joshcooper added a commit to joshcooper/puppet that referenced this issue Apr 10, 2017
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
joshcooper added a commit to joshcooper/puppet that referenced this issue Apr 10, 2017
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
shawnferry pushed a commit to shawnferry/puppet that referenced this issue Jun 30, 2017
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
@ku1ik
Copy link
Owner

ku1ik commented Nov 29, 2017

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.

@olleolleolle
Copy link
Collaborator

olleolleolle commented Dec 20, 2017

@wintersolutions Does 3.0 solve your issues?

@wintersolutions
Copy link
Author

@olleolleolle It does, thanks to all of you!

joshcooper added a commit to joshcooper/puppet that referenced this issue Jun 6, 2018
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
ccaviness pushed a commit to ccaviness/puppet that referenced this issue Sep 19, 2018
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
libmuy pushed a commit to libmuy/jekyll-archives-dir-category that referenced this issue Oct 19, 2021
"can't modify frozen String" error due to ku1ik/rainbow#48
hsbt pushed a commit to rubygems/bundler-graph that referenced this issue Oct 19, 2021
…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
patrickm68 pushed a commit to patrickm68/publicsuffix-ruby that referenced this issue Jun 14, 2023
Emilharipo pushed a commit to Emilharipo/peddler_ecommerce_ruby that referenced this issue May 3, 2024
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.

7 participants