読者です 読者をやめる 読者になる 読者になる

kikeda1104's blog

備忘録・技術に関することを書いています。(webエンジニア)

システムで使っているgemの削除

gem nokogiriのインストールにはまっていている最中にやっていたことですが記録しておきます。 すぐ忘れそう。

# 最新版(localにインストールされているなかで)のバージョン以外削除
% gem cleanup
Cleaning up installed gems...
Attempting to uninstall uglifier-2.3.3
Successfully uninstalled uglifier-2.3.3
Attempting to uninstall turbolinks-2.0.0
Successfully uninstalled turbolinks-2.0.0
Attempting to uninstall turbolinks-2.2.0
Successfully uninstalled turbolinks-2.2.0
Attempting to uninstall sass-3.2.12
Successfully uninstalled sass-3.2.12
Attempting to uninstall sass-3.2.13
Successfully uninstalled sass-3.2.13
Attempting to uninstall railties-4.0.0
Successfully uninstalled railties-4.0.0
Attempting to uninstall pg-0.17.0
Successfully uninstalled pg-0.17.0
Attempting to uninstall kaminari-0.14.1
Successfully uninstalled kaminari-0.14.1
Attempting to uninstall jquery-ui-rails-4.1.0
Successfully uninstalled jquery-ui-rails-4.1.0
Attempting to uninstall jquery-rails-3.0.4
Successfully uninstalled jquery-rails-3.0.4
Attempting to uninstall haml-4.0.5
Successfully uninstalled haml-4.0.5
Attempting to uninstall font-awesome-rails-3.2.1.3
Successfully uninstalled font-awesome-rails-3.2.1.3
Attempting to uninstall railties-4.0.1
Successfully uninstalled railties-4.0.1
Attempting to uninstall coffee-script-source-1.6.3
Successfully uninstalled coffee-script-source-1.6.3
Attempting to uninstall activerecord-4.0.0
Successfully uninstalled activerecord-4.0.0
Attempting to uninstall activerecord-4.0.1
Successfully uninstalled activerecord-4.0.1
Attempting to uninstall actionmailer-4.0.0
Successfully uninstalled actionmailer-4.0.0
Attempting to uninstall actionmailer-4.0.1
Successfully uninstalled actionmailer-4.0.1
Attempting to uninstall multi_json-1.8.2
Successfully uninstalled multi_json-1.8.2
Attempting to uninstall actionpack-4.0.0
Successfully uninstalled actionpack-4.0.0
Attempting to uninstall actionpack-4.0.1
Successfully uninstalled actionpack-4.0.1
Attempting to uninstall activemodel-4.0.0
Successfully uninstalled activemodel-4.0.0
Attempting to uninstall activemodel-4.0.1
Successfully uninstalled activemodel-4.0.1
Attempting to uninstall activesupport-4.0.0
Successfully uninstalled activesupport-4.0.0
Attempting to uninstall activesupport-4.0.1
Successfully uninstalled activesupport-4.0.1

続けて残りのgemを削除する

% gem uninstall --all -I -x
Successfully uninstalled activemodel-4.0.2
Successfully uninstalled activemodel-3.2.14
Successfully uninstalled activerecord-4.0.2
Successfully uninstalled activerecord-deprecated_finders-1.0.3
Successfully uninstalled activeresource-3.2.14
Successfully uninstalled activesupport-4.0.2
Successfully uninstalled activesupport-3.2.14
Successfully uninstalled acts-as-taggable-on-2.4.1
Successfully uninstalled addressable-2.3.5
Successfully uninstalled afm-0.2.0
Successfully uninstalled angular-rails-0.0.12
Successfully uninstalled angularjs-rails-1.2.0
Successfully uninstalled arbre-1.0.1
Successfully uninstalled arel-4.0.1
Successfully uninstalled asset_sync-1.0.0
Successfully uninstalled atomic-1.1.14
Successfully uninstalled attr_required-0.0.5
Successfully uninstalled awesome_print-1.2.0
Removing aws-rb
Successfully uninstalled aws-sdk-1.28.1
Successfully uninstalled bartt-ssl_requirement-1.4.2
Successfully uninstalled bcrypt-ruby-3.1.2
Successfully uninstalled bcrypt-ruby-3.0.1
Successfully uninstalled better_errors-1.0.1
Successfully uninstalled binding_of_caller-0.7.2
Successfully uninstalled bootstrap-sass-2.3.2.2
Successfully uninstalled bootstrap-sass-rails-3.0.2.1
Removing bourbon
Successfully uninstalled bourbon-3.1.8
Successfully uninstalled breadcrumbs_on_rails-2.3.0
Successfully uninstalled builder-3.1.4
Removing bundle
Removing bundler
Successfully uninstalled bundler-1.5.2
Removing byebug
Successfully uninstalled byebug-2.3.1
Removing cap
Removing capify
Successfully uninstalled capistrano-2.15.5
Successfully uninstalled capistrano-ext-1.2.1
Successfully uninstalled capistrano-platform-resources-0.1.3
Successfully uninstalled capistrano-rbenv-1.0.5
Successfully uninstalled capistrano_colors-0.5.5
Successfully uninstalled capybara-2.1.0
Successfully uninstalled capybara-2.0.3
Successfully uninstalled celluloid-0.15.2
Successfully uninstalled childprocess-0.3.9
Successfully uninstalled chronic-0.10.2
Successfully uninstalled chunky_png-1.2.9
Successfully uninstalled climate_control-0.0.3
Successfully uninstalled cliver-0.2.2
Successfully uninstalled cocaine-0.5.3
Successfully uninstalled coderay-1.1.0
Removing coderay
Successfully uninstalled coderay-1.0.9
Successfully uninstalled coffee-rails-4.0.1
Successfully uninstalled coffee-script-2.2.0
Successfully uninstalled coffee-script-source-1.7.0
Successfully uninstalled colorize_unpermitted_parameters-0.0.2
Successfully uninstalled columnize-0.3.6
Successfully uninstalled commonjs-0.2.7
Removing compass
Successfully uninstalled compass-0.12.2
Successfully uninstalled compass-rails-2.0.alpha.0
Removing cucumber
Successfully uninstalled cucumber-1.3.8
Successfully uninstalled cucumber-rails-1.4.0
Successfully uninstalled database_cleaner-1.1.1
Successfully uninstalled database_cleaner-0.9.1
Successfully uninstalled database_rewinder-0.0.2
Successfully uninstalled debug_inspector-0.0.2
Removing rdebug
Successfully uninstalled debugger-1.6.2
Successfully uninstalled debugger-linecache-1.2.0
Successfully uninstalled debugger-ruby_core_source-1.2.3
Successfully uninstalled default_value_for-2.0.3
Successfully uninstalled devise-3.2.1
Removing htmldiff
Removing ldiff
Successfully uninstalled diff-lcs-1.2.5
Successfully uninstalled docile-1.1.0
Successfully uninstalled domain_name-0.5.14
Successfully uninstalled doorkeeper-0.7.3
Removing dotenv
Successfully uninstalled dotenv-0.9.0
Successfully uninstalled draper-1.2.1
Successfully uninstalled erb2haml-0.1.5
Removing erubis
Successfully uninstalled erubis-2.7.0
Successfully uninstalled excon-0.25.3
Successfully uninstalled execjs-2.0.2
Successfully uninstalled execjs-1.4.0
Removing exifr
Successfully uninstalled exifr-1.1.3
Successfully uninstalled fabrication-2.2.3
Successfully uninstalled factory_girl-4.3.0
Successfully uninstalled factory_girl_rails-4.3.0
Successfully uninstalled faker-1.2.0
Successfully uninstalled faraday-0.8.8
Successfully uninstalled faraday_middleware-0.9.0
Successfully uninstalled fastercsv-1.5.5
Successfully uninstalled fb_graph-2.7.8
Successfully uninstalled ffi-1.9.3
Successfully uninstalled figaro-0.7.0
Removing fog
Successfully uninstalled fog-1.15.0
Successfully uninstalled font-awesome-rails-4.0.3.1
Removing foreman
Successfully uninstalled foreman-0.63.0
Successfully uninstalled formatador-0.2.4
Successfully uninstalled formtastic-2.2.1
Successfully uninstalled foursquare2-1.9.8
Successfully uninstalled fssm-0.2.10
Successfully uninstalled gherkin-2.12.2
Successfully uninstalled google_visualr-2.1.9
Successfully uninstalled gruff-0.4.0
Successfully uninstalled guard-2.2.3
Removing guard
Successfully uninstalled guard-1.8.3
Successfully uninstalled guard-rspec-4.0.4
Removing haml
Successfully uninstalled haml-4.1.0.alpha.2
Successfully uninstalled haml-rails-0.4
Successfully uninstalled has_scope-0.6.0.rc
Successfully uninstalled hashery-2.1.1
Successfully uninstalled hashie-2.0.5
Successfully uninstalled heroku-api-0.3.15
Successfully uninstalled heroku_san-4.3.0
Successfully uninstalled highline-1.6.19
Successfully uninstalled hike-1.2.3
Successfully uninstalled hirb-0.7.1
Successfully uninstalled hirb-unicode-0.0.5
Successfully uninstalled hpricot-0.8.6
Removing html2haml
Successfully uninstalled html2haml-1.0.1
Successfully uninstalled http-cookie-1.0.2
Removing httparty
Successfully uninstalled httparty-0.11.0
Successfully uninstalled httpauth-0.2.0
Removing httpclient
Successfully uninstalled httpclient-2.3.4.1
Successfully uninstalled i18n-0.6.9
Successfully uninstalled i18n_generators-1.2.1
Successfully uninstalled inherited_resources-1.4.1
Successfully uninstalled jbuilder-1.5.3
Successfully uninstalled journey-1.0.4
Successfully uninstalled jpmobile-4.0.0
Successfully uninstalled jquery-rails-3.1.0
Successfully uninstalled jquery-ui-rails-4.1.1
Successfully uninstalled jquery-ui-themes-0.0.11
Successfully uninstalled json-1.8.1
Successfully uninstalled json_spec-1.1.1
Successfully uninstalled jwt-0.1.8
Successfully uninstalled kaminari-0.15.1
Successfully uninstalled kgio-2.8.1
Successfully uninstalled koala-1.6.0
Removing kramdown
Successfully uninstalled kramdown-1.2.0
Removing launchy
Successfully uninstalled launchy-2.3.0
Removing lessc
Successfully uninstalled less-2.4.0
Successfully uninstalled less-rails-2.4.2
Successfully uninstalled letter_opener-1.1.2
Successfully uninstalled libv8-3.16.14.3-x86_64-darwin-12
Successfully uninstalled listen-2.2.0
Successfully uninstalled listen-1.3.1
Removing rlock
Successfully uninstalled lockfile-2.1.0
Successfully uninstalled lumberjack-1.0.4
Successfully uninstalled mail-2.5.4
Successfully uninstalled mechanize-2.7.2
Successfully uninstalled meta-tags-1.5.0
Successfully uninstalled meta_search-1.1.3
Successfully uninstalled metaclass-0.0.1
Successfully uninstalled method_source-0.8.2
Successfully uninstalled middleman-3.2.0
Removing middleman
Successfully uninstalled middleman-core-3.2.0
Successfully uninstalled middleman-sprockets-3.2.0
Successfully uninstalled migrant-1.5.0
Successfully uninstalled mime-types-1.25.1
Successfully uninstalled mini_portile-0.5.2
Successfully uninstalled minitest-4.7.5
Successfully uninstalled mocha-0.14.0
Successfully uninstalled msgpack-0.5.7
Successfully uninstalled multi_json-1.8.4
Successfully uninstalled multi_test-0.0.2
Successfully uninstalled multi_xml-0.5.5
Successfully uninstalled multipart-post-1.2.0
Successfully uninstalled mysql2-0.3.14
Successfully uninstalled nested_form-0.3.2
Successfully uninstalled net-http-digest_auth-1.4
Successfully uninstalled net-http-persistent-2.9
Successfully uninstalled net-scp-1.1.2
Successfully uninstalled net-sftp-2.1.2
Successfully uninstalled net-ssh-2.7.0
Successfully uninstalled net-ssh-gateway-1.2.0
Removing mongrel_rpm
Removing newrelic_cmd
Removing newrelic
Removing nrdebug
Successfully uninstalled newrelic_rpm-3.6.9.171
Successfully uninstalled ngmin-rails-0.4.0
Successfully uninstalled ntlm-http-0.1.1
Removing oauth
Successfully uninstalled oauth-0.4.7
Successfully uninstalled oauth2-0.8.1
Successfully uninstalled omniauth-1.1.4
Successfully uninstalled omniauth-facebook-1.4.1
Successfully uninstalled omniauth-oauth-1.0.1
Successfully uninstalled omniauth-oauth2-1.1.1
Successfully uninstalled omniauth-twitter-1.0.1
Successfully uninstalled orm_adapter-0.5.0
Successfully uninstalled paperclip-3.4.2
Removing pdf_object
Removing pdf_text
Removing pdf_list_callbacks
Removing pdf_callbacks
Successfully uninstalled pdf-reader-1.3.3
Successfully uninstalled pg-0.17.1
Successfully uninstalled pjax-rails-0.1.4
Successfully uninstalled pjax_rails-0.3.4
Successfully uninstalled poltergeist-1.4.1
Successfully uninstalled polyamorous-0.6.4
Successfully uninstalled polyamorous-0.5.0
Successfully uninstalled polyglot-0.3.3
Successfully uninstalled prawn-1.0.0.rc2
Successfully uninstalled protected_attributes-1.0.3
Removing pry
Successfully uninstalled pry-0.9.12.3
Successfully uninstalled pry-byebug-1.2.0
Successfully uninstalled pry-debugger-0.2.2
Successfully uninstalled pry-doc-0.4.6
Successfully uninstalled pry-rails-0.3.2
Removing pry-remote
Successfully uninstalled pry-remote-0.1.7
Successfully uninstalled pry-stack_explorer-0.4.9.1
Successfully uninstalled quiet_assets-1.0.2
Successfully uninstalled rabl-0.9.0
Removing rackup
Successfully uninstalled rack-1.5.2
Successfully uninstalled rack-cache-1.2
Successfully uninstalled rack-mini-profiler-0.1.31
Successfully uninstalled rack-mount-0.8.3
Successfully uninstalled rack-oauth2-1.0.6
Successfully uninstalled rack-pjax-0.7.0
Successfully uninstalled rack-ssl-1.3.3
Successfully uninstalled rack-test-0.6.2
Successfully uninstalled rails-4.0.2
Removing rails-api
Successfully uninstalled rails-api-0.1.0
Successfully uninstalled rails-i18n-4.0.0
Successfully uninstalled rails-pjax-0.0.2
Successfully uninstalled rails_12factor-0.0.2
Successfully uninstalled rails_config-0.3.3
Successfully uninstalled rails_serve_static_assets-0.0.2
Successfully uninstalled rails_stdout_logging-0.0.3
Removing rails
Successfully uninstalled railties-4.0.2
Successfully uninstalled raindrops-0.12.0
Successfully uninstalled rake-10.1.1
Successfully uninstalled rake-10.1.0
Successfully uninstalled rake-10.0.4
Successfully uninstalled rake-0.9.2.2
Successfully uninstalled ransack-1.0.0
Successfully uninstalled rb-fsevent-0.9.3
Successfully uninstalled rb-inotify-0.9.2
Successfully uninstalled rb-kqueue-0.2.0
Successfully uninstalled rdoc-4.1.1
Successfully uninstalled rdoc-3.12.2
Successfully uninstalled redis-3.0.5
Successfully uninstalled redis-objects-0.7.0
Successfully uninstalled ref-1.0.5
Successfully uninstalled request_store-1.0.5
Successfully uninstalled responders-1.0.0.rc
Successfully uninstalled rmagick-2.13.2
Successfully uninstalled rspec-2.14.1
Successfully uninstalled rspec-2.13.0
Successfully uninstalled rspec-core-2.14.7
Removing autospec
Removing rspec
Successfully uninstalled rspec-core-2.13.1
Successfully uninstalled rspec-expectations-2.14.4
Successfully uninstalled rspec-expectations-2.13.0
Successfully uninstalled rspec-mocks-2.14.4
Successfully uninstalled rspec-mocks-2.13.1
Successfully uninstalled rspec-rails-2.14.0
Successfully uninstalled rspec-rails-2.13.0
Successfully uninstalled ruby-hmac-0.4.0
Successfully uninstalled ruby-rc4-0.1.5
Removing ruby_parse
Removing ruby_parse_extract_error
Successfully uninstalled ruby_parser-3.1.3
Successfully uninstalled rubyzip-0.9.9
Removing sass
Removing sass-convert
Removing scss
Successfully uninstalled sass-3.2.14
Successfully uninstalled sass-rails-4.0.1
Successfully uninstalled sdoc-0.4.0
Removing sdoc
Removing sdoc-merge
Successfully uninstalled sdoc-0.3.20
Successfully uninstalled selenium-webdriver-2.31.0
Successfully uninstalled settingslogic-2.0.9
Successfully uninstalled sexp_processor-4.4.0
Successfully uninstalled shoulda-3.5.0
Removing convert_to_should_syntax
Successfully uninstalled shoulda-context-1.1.5
Successfully uninstalled shoulda-matchers-2.4.0
Successfully uninstalled simple_form-3.0.0
Successfully uninstalled simplecov-0.8.1
Successfully uninstalled simplecov-0.7.1
Successfully uninstalled simplecov-html-0.8.0
Successfully uninstalled simplecov-html-0.7.1
Removing slimrb
Successfully uninstalled slim-1.3.9
Successfully uninstalled slim-rails-1.1.1
Successfully uninstalled slop-3.4.7
Successfully uninstalled sorcery-0.8.4
Successfully uninstalled spork-1.0.0rc4
Removing spork
Successfully uninstalled spork-1.0.0rc3
Removing spring
Successfully uninstalled spring-0.9.2
Successfully uninstalled spring-commands-cucumber-1.0.1
Successfully uninstalled spring-commands-rspec-1.0.1
Removing sprockets
Successfully uninstalled sprockets-2.10.1
Successfully uninstalled sprockets-helpers-1.0.1
Successfully uninstalled sprockets-rails-2.0.1
Successfully uninstalled sprockets-sass-1.0.2
Successfully uninstalled sqlite3-1.3.8
Successfully uninstalled squeel-1.1.1
Removing tapp
Successfully uninstalled tapp-1.4.0
Successfully uninstalled temple-0.6.6
Removing cdiff
Removing decolor
Removing colortab
Removing term_mandel
Removing term_display
Successfully uninstalled term-ansicolor-1.2.2
Removing thor
Successfully uninstalled thor-0.18.1
Successfully uninstalled thread_safe-0.1.3
Successfully uninstalled tilt-1.4.1
Removing tilt
Successfully uninstalled tilt-1.3.6
Successfully uninstalled timers-1.1.0
Successfully uninstalled tins-0.13.1
Removing tt
Successfully uninstalled treetop-1.4.15
Successfully uninstalled ttfunk-1.0.3
Successfully uninstalled tzinfo-0.3.38
Successfully uninstalled unf-0.1.2
Successfully uninstalled unf_ext-0.0.6
Successfully uninstalled unicode-display_width-0.1.1
Successfully uninstalled uuidtools-2.1.4
Successfully uninstalled warden-1.2.3
Successfully uninstalled webrobots-0.1.1
Successfully uninstalled websocket-1.0.7
Successfully uninstalled websocket-driver-0.3.0
Successfully uninstalled xpath-2.0.0
Successfully uninstalled xpath-1.0.0
Removing yard
Removing yardoc
Removing yri
Successfully uninstalled yard-0.8.7.3

%gem li --no-versions

*** LOCAL GEMS ***

bigdecimal
io-console
json
minitest
psych
rake
rdoc

これで削除終了。 bundlerでプロジェクト事にgemを管理するほうが、余計なgemをシステムで読み出す必要がなさそう。

参考URL Rubyのパッケージマネジメントシステムgem(Rubygems)のコマンド一覧