Rubocop: Rubocop doesn't install from Gemfile

Created on 22 Jan 2017  路  4Comments  路  Source: rubocop-hq/rubocop

I add rubocop into Gemfile like that

group :development, :test do
  ...
  gem 'rubocop', require: false
  ...
end

I do bundle install but install output error

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

    can't modify frozen String

Gem files will remain installed in
/home/test/.rvm/gems/ruby-2.4.0@prelaunchr/gems/rainbow-2.2.1 for inspection.
Results logged to
/home/test/.rvm/gems/ruby-2.4.0@prelaunchr/extensions/x86_64-linux/2.4.0/rainbow-2.2.1/gem_make.out

An error occurred while installing rainbow (2.2.1), and Bundler cannot
continue.
Make sure that `gem install rainbow -v '2.2.1'` succeeds before bundling.

I install rainbow manual and then bundle install go without problem. After install I check Gemfile.lock and only rubocop depend on rainbow

My ruby version

$ ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]

Also I use rvm

$ rvm --version
rvm 1.28.0 (master) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io/]

My system

$ uname -a
Linux test 4.8.0-34-generic #36-Ubuntu SMP Wed Dec 21 17:24:18 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.10
Release:    16.10
Codename:   yakkety

Most helpful comment

Do you use bundler v1.14.0 ?
If you use the version, it is a bug of rubygems. https://github.com/sickill/rainbow/issues/48

Could you try gem update --system ?

All 4 comments

Do you use bundler v1.14.0 ?
If you use the version, it is a bug of rubygems. https://github.com/sickill/rainbow/issues/48

Could you try gem update --system ?

$ bundler -v
Bundler version 1.13.7

I use bundler after gem install bundler

Sorry, I mistake RVM, this is right output

$ bundler -v
Bundler version 1.14.1

Could you try gem update --system ?

Yes, it helps, thanks

Was this page helpful?
0 / 5 - 0 ratings