Reinstalando ruby

1

De alguna manera jodí mi instalación de rubí. Dice:

ruby ....
/Library/Ruby/Site/2.0.0/rubygems.rb:1098:in 'register_default_spec': undefined method 'default_gems_use_full_paths?' for Gem:Module (NoMethodError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:699:in 'block in load_defaults'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:647:in 'block (2 levels) in each_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:643:in 'each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:643:in 'block in each_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:642:in 'each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:642:in 'each_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:653:in 'each_default'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:698:in 'load_defaults'
from /Library/Ruby/Site/2.0.0/rubygems.rb:1239:in '<top (required)>'
from <internal:gem_prelude>:1:in 'require'
from <internal:gem_prelude>:1:in '<compiled>'

Actualicé todas las gemas o algo que me gusta. ¿Cómo puedo volver a la instalación original de ruby? Supongo que tengo una copia de seguridad de Timemachine, pero quizás una reinstalación limpia sea mejor.

Editar: OK, eliminé las gemas como se sugiere en una respuesta, pero cuando intento reinstalarlas, obtengo:

gem install flickraw
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems /core_ext/kernel_require.rb:55:in 'require': cannot load such file -- rubygems/util (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
from /Library/Ruby/Site/2.0.0/rubygems.rb:527:in 'gunzip'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/remote_fetcher.rb:275:in 'fetch_path'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/remote_fetcher.rb:304:in 'cache_update_path'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/source.rb:130:in 'load_specs'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/spec_fetcher.rb:230:in 'tuples_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/spec_fetcher.rb:199:in 'block in available_specs'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/source_list.rb:55:in 'each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/source_list.rb:55:in 'each_source'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/spec_fetcher.rb:195:in 'available_specs'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/spec_fetcher.rb:81:in 'search_for_dependency'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/spec_fetcher.rb:139:in 'spec_for_dependency'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency_installer.rb:156:in 'find_gems_with_sources'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency_installer.rb:303:in 'find_spec_by_name_and_version'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency_installer.rb:109:in 'available_set_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency_installer.rb:329:in 'install'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/commands/install_command.rb:166:in 'block in execute'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/commands/install_command.rb:158:in 'each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/commands/install_command.rb:158:in 'execute'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/command.rb:305:in 'invoke_with_build_args'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/command_manager.rb:170:in 'process_args'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/command_manager.rb:130:in 'run'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/gem_runner.rb:60:in 'run'
from /usr/bin/gem:21:in '<main>'
    
pregunta Stefan Müller 31.01.2015 - 16:00

1 respuesta

3

Debes poder limpiar todas tus gemas de Ruby con este comando de Terminal:

sudo rm -rf /Library/Ruby/Gems/#num

Donde #num es tu versión de Ruby instalada (para Yosemite y Mavericks, que debería ser 2.0 , y para Snow Leapard, Lion y Mountain Lion, debería ser 1.8).

También debe mantener todas las gemas proporcionadas por el sistema intactas , lo cual es bueno, ya que algunas aplicaciones pueden requerirlas. .

    
respondido por el AstroCB 31.01.2015 - 17:03

Lea otras preguntas en las etiquetas