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

Can't get rid of "gem pristine --all" warning #320

Open
conf opened this Issue Jul 2, 2014 · 20 comments

Comments

Projects
None yet
@conf

conf commented Jul 2, 2014

Hi, first of all I want to say that I've read issue #240 and it seems very similar to my case, except I don't use bundle --path so I don't know how to fix it. So when I try to run gem pristine --all I get this:

admin@shein ~/projects/smarty (master=) $ gem pristine --all
Restoring gems to pristine condition...
Restored actionmailer-3.2.18
Restored actionpack-3.2.18
Restored active_model_serializers-0.8.1
Restored activeadmin-0.6.0
Restored activemodel-3.2.18
Restored activerecord-3.2.18
Restored activerecord-postgres-hstore-0.7.6
Restored activeresource-3.2.18
Restored activesupport-3.2.18
Restored addressable-2.3.5
Restored airbrake-3.1.14
Restored arbre-1.0.1
Restored arel-3.0.3
Restored awesome_print-1.2.0
Restored best_in_place-2.1.0
Restored better_errors-1.1.0
Cached gem for bigdecimal-1.1.0 not found, attempting to fetch...
ERROR:  While executing gem ... (Gem::InstallError)
    invalid gem: No such file or directory - /Users/admin/.rvm/gems/ruby-1.9.3-p392@global/cache/bigdecimal-1.1.0.gem

I use rvm with ruby-1.9.3-p392, Rails 3.2.18, Spring 1.1.3.
Thank you.

@jonleighton jonleighton added the bug label Jul 7, 2014

@conf

This comment has been minimized.

Show comment
Hide comment
@conf

conf Jul 9, 2014

Can I do anything to speed up solving of this issue?

conf commented Jul 9, 2014

Can I do anything to speed up solving of this issue?

@dmitry

This comment has been minimized.

Show comment
Hide comment
@dmitry

dmitry Jul 9, 2014

One of my application also have the same issue. bigdecimal isn't in the Gemfile.lock.

dmitry commented Jul 9, 2014

One of my application also have the same issue. bigdecimal isn't in the Gemfile.lock.

@agis

This comment has been minimized.

Show comment
Hide comment
@agis

agis Jul 10, 2014

Contributor

@conf @dmitry Uninstall every gem that throws this error and re-run $ gem pristine --all and then $ bundle.

Contributor

agis commented Jul 10, 2014

@conf @dmitry Uninstall every gem that throws this error and re-run $ gem pristine --all and then $ bundle.

@dmitry

This comment has been minimized.

Show comment
Hide comment
@dmitry

dmitry Jul 10, 2014

The same issue.

$ gem uninstall bigdecimal
ERROR:  While executing gem ... (Gem::InstallError)
    bigdecimal is not installed in GEM_HOME, try:
    gem uninstall -i /home/dmitry/.rvm/gems/ruby-1.9.3-p547@global bigdecimal
$ gem pristine --all
Restoring gems to pristine condition...
Building native extensions with: ''
This could take a while...
Restored RedCloth-4.2.9
Restored aasm-3.0.14
Restored actionmailer-3.2.18
Restored actionmailer_inline_css-1.5.2
Restored actionpack-3.2.18
Restored activemodel-3.2.18
Restored activerecord-3.2.18
Restored activerecord-tableless-1.3.4
Restored activeresource-3.2.18
Restored activesupport-3.2.18
Restored addressable-2.2.8
Restored akami-1.2.0
Restored ancestry-2.0.0
Restored arbre-1.0.1
Restored arel-3.0.3
Restored assert_json-0.1.1
Restored ast-2.0.0
Restored autoparse-0.2.3
Restored awesome_print-1.2.0
Restored babosa-0.3.11
Restored backports-2.6.5
Building native extensions with: ''
This could take a while...
Restored bcrypt-ruby-3.0.1
Cached gem for bigdecimal-1.1.0 not found, attempting to fetch...
ERROR:  While executing gem ... (Gem::InstallError)
    invalid gem: No such file or directory - /home/dmitry/.rvm/gems/ruby-1.9.3-p547@global/cache/bigdecimal-1.1.0.gem

dmitry commented Jul 10, 2014

The same issue.

$ gem uninstall bigdecimal
ERROR:  While executing gem ... (Gem::InstallError)
    bigdecimal is not installed in GEM_HOME, try:
    gem uninstall -i /home/dmitry/.rvm/gems/ruby-1.9.3-p547@global bigdecimal
$ gem pristine --all
Restoring gems to pristine condition...
Building native extensions with: ''
This could take a while...
Restored RedCloth-4.2.9
Restored aasm-3.0.14
Restored actionmailer-3.2.18
Restored actionmailer_inline_css-1.5.2
Restored actionpack-3.2.18
Restored activemodel-3.2.18
Restored activerecord-3.2.18
Restored activerecord-tableless-1.3.4
Restored activeresource-3.2.18
Restored activesupport-3.2.18
Restored addressable-2.2.8
Restored akami-1.2.0
Restored ancestry-2.0.0
Restored arbre-1.0.1
Restored arel-3.0.3
Restored assert_json-0.1.1
Restored ast-2.0.0
Restored autoparse-0.2.3
Restored awesome_print-1.2.0
Restored babosa-0.3.11
Restored backports-2.6.5
Building native extensions with: ''
This could take a while...
Restored bcrypt-ruby-3.0.1
Cached gem for bigdecimal-1.1.0 not found, attempting to fetch...
ERROR:  While executing gem ... (Gem::InstallError)
    invalid gem: No such file or directory - /home/dmitry/.rvm/gems/ruby-1.9.3-p547@global/cache/bigdecimal-1.1.0.gem
@agis

This comment has been minimized.

Show comment
Hide comment
@agis

agis Jul 10, 2014

Contributor

As the output states, you have to run $ gem uninstall -i /home/dmitry/.rvm/gems/ruby-1.9.3-p547@global bigdecimal in order to delete this gem.

Contributor

agis commented Jul 10, 2014

As the output states, you have to run $ gem uninstall -i /home/dmitry/.rvm/gems/ruby-1.9.3-p547@global bigdecimal in order to delete this gem.

@conf

This comment has been minimized.

Show comment
Hide comment
@conf

conf Jul 10, 2014

@Agis- Thank you, it finally worked. After removing and adding some gems back and forth in @global and current gemsets the warning finally gone.

conf commented Jul 10, 2014

@Agis- Thank you, it finally worked. After removing and adding some gems back and forth in @global and current gemsets the warning finally gone.

@dmitry

This comment has been minimized.

Show comment
Hide comment
@dmitry

dmitry Jul 10, 2014

Thanks @Agis- now it works.

dmitry commented Jul 10, 2014

Thanks @Agis- now it works.

@vanboom

This comment has been minimized.

Show comment
Hide comment
@vanboom

vanboom Jul 17, 2014

How do you determine which gems are throwing the error?
thanks

vanboom commented Jul 17, 2014

How do you determine which gems are throwing the error?
thanks

@agis

This comment has been minimized.

Show comment
Hide comment
@agis

agis Jul 17, 2014

Contributor

@vanboom You run $ gem pristine --all and you see.

Contributor

agis commented Jul 17, 2014

@vanboom You run $ gem pristine --all and you see.

@vanboom

This comment has been minimized.

Show comment
Hide comment
@vanboom

vanboom Jul 17, 2014

Here is a sample from $ gem pristine --all ... no errors are shown... maybe the issue is coming from the Skipped gems?

Restored bcrypt-3.1.7
Skipped bigdecimal-1.2.4, it is a default gem
Restored builder-3.2.2
Restored bundler-1.6.3
Restored cancan-1.6.10
Restored capybara-2.4.1

I ran gem update...
I ran gem pristine --all
bundle install...

...still receiving the Warning from Spring.

vanboom commented Jul 17, 2014

Here is a sample from $ gem pristine --all ... no errors are shown... maybe the issue is coming from the Skipped gems?

Restored bcrypt-3.1.7
Skipped bigdecimal-1.2.4, it is a default gem
Restored builder-3.2.2
Restored bundler-1.6.3
Restored cancan-1.6.10
Restored capybara-2.4.1

I ran gem update...
I ran gem pristine --all
bundle install...

...still receiving the Warning from Spring.

@toupeira

This comment has been minimized.

Show comment
Hide comment
@toupeira

toupeira Jul 30, 2014

Got the same problem here on Debian sid, I suspect this is interference from the rubygems-integration package which makes system Ruby packages visible as installed gems (details here).

toupeira commented Jul 30, 2014

Got the same problem here on Debian sid, I suspect this is interference from the rubygems-integration package which makes system Ruby packages visible as installed gems (details here).

@claytonsilva

This comment has been minimized.

Show comment
Hide comment
@claytonsilva

claytonsilva Sep 5, 2014

$ gem uninstall -i /home/dmitry/.rvm/gems/ruby-1.9.3-p547@global bigdecimal

this work for me

claytonsilva commented Sep 5, 2014

$ gem uninstall -i /home/dmitry/.rvm/gems/ruby-1.9.3-p547@global bigdecimal

this work for me

@zepplock

This comment has been minimized.

Show comment
Hide comment
@zepplock

zepplock Sep 24, 2014

I had to manually delete /Users/user/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/gems/1.9.1/specifications/bigdecimal-1.1.0.gemspec to make it work

zepplock commented Sep 24, 2014

I had to manually delete /Users/user/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/gems/1.9.1/specifications/bigdecimal-1.1.0.gemspec to make it work

@EdmundLeex

This comment has been minimized.

Show comment
Hide comment
@EdmundLeex

EdmundLeex Oct 25, 2014

$ gem uninstall -i /home/dmitry/.rvm/gems/ruby-1.9.3-p547@global bigdecimal

This work for me as well. Thanks, agis

EdmundLeex commented Oct 25, 2014

$ gem uninstall -i /home/dmitry/.rvm/gems/ruby-1.9.3-p547@global bigdecimal

This work for me as well. Thanks, agis

@aar0nr

This comment has been minimized.

Show comment
Hide comment
@aar0nr

aar0nr Apr 3, 2015

Same issue here on a freshly generated rails app.

I installed ruby using the Brightbox packages for Ubuntu.

$ ruby -v
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux-gnu]
$ rails -v
Rails 4.2.1

Running any springified binstub produces a warning:

$ bin/rake
Warning: Running `gem pristine --all` to regenerate your installed gemspecs (and deleting then reinstalling your bundle if you use bundle --path) will improve the startup performance of Spring.

Running gem pristine --all doesn't produce any errors and doesn't fix the issue.

aar0nr commented Apr 3, 2015

Same issue here on a freshly generated rails app.

I installed ruby using the Brightbox packages for Ubuntu.

$ ruby -v
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux-gnu]
$ rails -v
Rails 4.2.1

Running any springified binstub produces a warning:

$ bin/rake
Warning: Running `gem pristine --all` to regenerate your installed gemspecs (and deleting then reinstalling your bundle if you use bundle --path) will improve the startup performance of Spring.

Running gem pristine --all doesn't produce any errors and doesn't fix the issue.

@tubbo

This comment has been minimized.

Show comment
Hide comment
@tubbo

tubbo May 7, 2015

I'm also seeing this warning, and wondering what causes it. Was thinking maybe it's because there are path: references in my Gemfile? Anyway, doing this gem pristine --all stuff doesn't seem to get rid of the warning, as soon as Spring runs a few times it pops back up every time.

tubbo commented May 7, 2015

I'm also seeing this warning, and wondering what causes it. Was thinking maybe it's because there are path: references in my Gemfile? Anyway, doing this gem pristine --all stuff doesn't seem to get rid of the warning, as soon as Spring runs a few times it pops back up every time.

@twelvelabs

This comment has been minimized.

Show comment
Hide comment
@twelvelabs

twelvelabs Aug 2, 2015

I'm unable to get rid of this warning as well - and also using the brightbox 2.2 package on ubuntu. I manually went through the spring binstub process and when I got to here:

if unstubbed.any?

The only gems in the unstubbed array were:

irb(main):013:0> unstubbed.map(&:name)
=> ["json", "rake", "rdoc"]
irb(main):014:0> unstubbed.map(&:version)
=> [#<Gem::Version "1.8.1">, #<Gem::Version "10.4.2">, #<Gem::Version "4.2.0">]

These are the default versions installed in the brightbox package, but they're not returning true for default_gem?.

twelvelabs commented Aug 2, 2015

I'm unable to get rid of this warning as well - and also using the brightbox 2.2 package on ubuntu. I manually went through the spring binstub process and when I got to here:

if unstubbed.any?

The only gems in the unstubbed array were:

irb(main):013:0> unstubbed.map(&:name)
=> ["json", "rake", "rdoc"]
irb(main):014:0> unstubbed.map(&:version)
=> [#<Gem::Version "1.8.1">, #<Gem::Version "10.4.2">, #<Gem::Version "4.2.0">]

These are the default versions installed in the brightbox package, but they're not returning true for default_gem?.

@justinko

This comment has been minimized.

Show comment
Hide comment
@justinko

justinko Jan 4, 2016

Same experience as @twelvelabs :(

justinko commented Jan 4, 2016

Same experience as @twelvelabs :(

@xofred

This comment has been minimized.

Show comment
Hide comment
@xofred

xofred May 6, 2016

I hit this warning too with ruby-2.2.0. When I use 2.3.0, warning is gone, spring works perfectly. Don't know why but problem solved ...

xofred commented May 6, 2016

I hit this warning too with ruby-2.2.0. When I use 2.3.0, warning is gone, spring works perfectly. Don't know why but problem solved ...

@thomsbg

This comment has been minimized.

Show comment
Hide comment
@thomsbg

thomsbg Oct 7, 2016

On my system (Ubuntu 12.04, ruby 2.2.2), disabling the rubygems-integration package (via DEBIAN_DISABLE_RUBYGEMS_INTEGRATION=1 in my .bashrc) appears to solve the problem.

As I discovered when reading https://kevinlocke.name/bits/2012/12/06/debian-ruby-gems/, the rubygems-integration package changes the default gem installation directory from /usr/lib/ruby/... to /var/lib/ruby/....

Doing so breaks the implementation of Gem::StubSpecification#default_gem? (it doesn't return true for default gems when it should), which triggers the spring warning. Perhaps this has been fixed in ruby 2.3?

thomsbg commented Oct 7, 2016

On my system (Ubuntu 12.04, ruby 2.2.2), disabling the rubygems-integration package (via DEBIAN_DISABLE_RUBYGEMS_INTEGRATION=1 in my .bashrc) appears to solve the problem.

As I discovered when reading https://kevinlocke.name/bits/2012/12/06/debian-ruby-gems/, the rubygems-integration package changes the default gem installation directory from /usr/lib/ruby/... to /var/lib/ruby/....

Doing so breaks the implementation of Gem::StubSpecification#default_gem? (it doesn't return true for default gems when it should), which triggers the spring warning. Perhaps this has been fixed in ruby 2.3?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment