Redmine not loading; gems installed not loading - ruby

Dears,
I am having a problem with ruby to get Redmine to work again. Basically this was working before somehow before, but now after some operations that I can not really get to the person who executed and messed up things the system is not working anymore. I have fixed a few other issues already, but this mysql2 problem scapes my skill set:
-------- The exception is as follows: -------
Could not find mysql2-0.3.21 in any of the sources (Bundler::GemNotFound)
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.16.5/lib/bundler/spec_set.rb:91:in `block in materialize'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.16.5/lib/bundler/spec_set.rb:85:in `map!'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.16.5/lib/bundler/spec_set.rb:85:in `materialize'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.16.5/lib/bundler/definition.rb:171:in `specs'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.16.5/lib/bundler/definition.rb:238:in `specs_for'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.16.5/lib/bundler/definition.rb:227:in `requested_specs'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.16.5/lib/bundler/runtime.rb:108:in `block in definition_method'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.16.5/lib/bundler/runtime.rb:20:in `setup'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.16.5/lib/bundler.rb:107:in `setup'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.16.5/lib/bundler/setup.rb:20:in `<top (required)>'
/usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:430:in `activate_gem'
/usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:297:in `block in run_load_path_setup_code'
/usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:435:in `running_bundler'
/usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:296:in `run_load_path_setup_code'
/usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/helper-scripts/rack-preloader.rb:100:in `preload_app'
/usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/helper-scripts/rack-preloader.rb:156:in `<module:App>'
/usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/helper-scripts/rack-preloader.rb:29:in `<main>'
I have already installed mysql2 gem and the specific version asked for:
# ls -lah /usr/local/lib/ruby/gems/2.4.0/gems/mysql2-0.3.21
total 52K
drwxr-xr-x. 7 root root 4.0K Jun 27 2017 .
drwxr-xr-x. 97 root root 4.0K Jun 28 2017 ..
-rw-r--r--. 1 root root 1.1K Jun 27 2017 LICENSE
-rw-r--r--. 1 root root 20K Jun 27 2017 README.md
drwxr-xr-x. 2 root root 4.0K Jun 27 2017 examples
drwxr-xr-x. 3 root root 4.0K Jun 27 2017 ext
drwxr-xr-x. 3 root root 4.0K Jun 27 2017 lib
drwxr-xr-x. 4 root root 4.0K Jun 27 2017 spec
drwxr-xr-x. 2 root root 4.0K Jun 27 2017 support
All seemed to be fine for me:
# ruby -v
ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-linux]
gems:
# gem list
*** LOCAL GEMS ***
actionmailer (4.2.7.1, 3.2.14)
actionpack (4.2.7.1, 3.2.14)
actionpack-action_caching (1.2.0, 1.1.1)
actionpack-xml_parser (1.0.2)
actionview (4.2.7.1)
activejob (4.2.7.1)
activemodel (4.2.7.1, 3.2.14)
activerecord (4.2.7.1, 3.2.14)
activeresource (3.2.14)
activesupport (4.2.7.1, 3.2.14)
addressable (2.5.2, 2.5.1, 2.5.0)
afm (0.2.0)
arel (6.0.4, 6.0.3, 3.0.3, 3.0.2)
Ascii85 (1.0.2)
authlogic (3.8.0, 3.3.0)
bigdecimal (default: 1.2.6)
blitz (0.1.30)
bootstrap-sass (2.3.2.2)
builder (3.2.3, 3.2.2, 3.0.4)
bundler (1.16.5, default: 1.16.2, 1.15.1)
cancan (1.6.10)
capybara (2.14.4, 2.1.0)
childprocess (0.7.1)
chosen-rails (1.0.0)
chunky_png (1.2.8)
cocaine (0.3.2)
coderay (1.1.1)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.6.3)
commonjs (0.2.6)
compass (0.12.2)
compass-rails (1.0.3)
concurrent-ruby (1.0.5, 1.0.4)
couchrest (1.0.1)
css_parser (1.5.0, 1.4.7)
diff-lcs (1.2.4)
docile (1.1.5)
erubis (2.7.0)
execjs (1.4.0)
expectr (0.9.1)
factory_girl (4.2.0)
factory_girl_rails (4.2.1)
faraday (0.9.0)
fcgi (0.9.2.1)
ffi (1.9.25, 1.9.18)
ffi-compiler (1.0.1)
fssm (0.2.10)
globalid (0.4.0, 0.3.7)
hashery (2.1.0)
hashie (1.2.0)
hexdump (0.2.3)
hike (1.2.3)
htmlentities (4.3.4, 4.3.1)
httpauth (0.2.1)
i18n (0.9.5, 0.8.4, 0.7.0, 0.6.5)
io-console (default: 0.4.3)
journey (1.0.4)
jquery-rails (3.1.4, 3.0.4)
jquery-ui-rails (4.0.4)
json (2.1.0, 1.8.6, 1.8.3, default: 1.8.1)
json_pure (1.8.0)
jwt (0.1.13)
kaminari (0.14.1)
kgio (2.9.2)
less (2.3.2)
less-rails (2.3.3)
libv8 (3.11.8.17 x86_64-linux)
loofah (2.0.3)
mail (2.6.6, 2.6.4, 2.5.5, 2.5.4)
metaclass (0.0.4)
mime-types (3.1, 1.25.1, 1.24)
mime-types-data (3.2016.0521)
mimemagic (0.3.2)
mini_portile (0.5.1)
mini_portile2 (2.2.0, 2.1.0)
minitest (5.10.2, 5.10.1, 5.4.3)
mocha (1.2.1)
multi_json (1.13.1, 1.12.1, 1.7.9)
multipart-post (2.0.0)
mysql (2.9.1)
net-ldap (0.12.1)
nokogiri (1.8.0, 1.6.8.1, 1.6.0)
passenger (5.3.4)
polyglot (0.3.5, 0.3.3)
power_assert (0.2.2)
protected_attributes (1.1.4, 1.1.3)
psych (default: 2.0.8)
public_suffix (3.0.3, 2.0.5, 2.0.4)
rack (1.6.8, 1.6.5, 1.4.7, 1.4.5)
rack-cache (1.8.0, 1.2)
rack-openid (1.4.2)
rack-ssl (1.3.3)
rack-test (0.6.3, 0.6.2)
rails (4.2.7.1)
rails-deprecated_sanitizer (1.0.3)
rails-dom-testing (1.0.8, 1.0.7)
rails-html-sanitizer (1.0.3)
railties (4.2.7.1, 3.2.14)
rake (12.3.1, 12.0.0, default: 10.4.2, 10.1.0)
rbpdf (1.19.2, 1.19.0)
rbpdf-font (1.19.1, 1.19.0)
rdoc (5.1.0, default: 4.2.0, 3.12.2)
redcarpet (3.3.4)
request_store (1.4.1, 1.0.5)
rest-client (1.6.7)
rmagick (2.16.0)
roadie (3.2.2, 3.2.0)
roadie-rails (1.2.1, 1.1.1)
ruby-openid (2.3.0)
rubygems-update (2.7.7)
rubyzip (1.2.1)
sass (3.2.10)
sass-rails (3.2.6)
scrypt (3.0.5)
selenium-webdriver (3.4.3)
simplecov (0.9.2)
simplecov-html (0.9.0)
sprockets (3.7.1, 2.2.3, 2.2.2)
sprockets-rails (3.2.0)
term-ansicolor (1.0.5)
test-unit (3.0.8)
thor (0.19.4, 0.18.1)
thread_safe (0.3.6, 0.3.5)
tilt (1.4.1)
treetop (1.4.15)
tzinfo (1.2.3, 1.2.2, 0.3.54, 0.3.37)
xpath (2.1.0, 2.0.0)
yard (0.9.9)
Why would this be happening?

Your installation looks messy. Take a look:
Call stack shows gems from different Ruby versions (2.2 and 2.4):
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.16.5
...
/usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.5
Mysql2 gem is installed for Ruby 2.4:
/usr/local/lib/ruby/gems/2.4.0/gems/mysql2-0.3.21
But your current version of Ruby is 2.2 (2.2.4p230 to be correct). And for this version mysql2 gem is not present; only mysql is available:
mysql (2.9.1)
I would recommend uninstalling rubies you don't use along with gems, keep one which you prefer, and for that version install all required gems from scratch. Or, better, use rvm or other Ruby manager along with gemsets.

Related

`require': cannot load such file -- HTTParty (LoadError)

First off I'm a Newbie in regards to Ruby, and I'm following the simple tutorial on https://www.distilled.net/resources/web-scraping-with-ruby-and-nokogiri-for-beginners/
I have a test.rb file that contains the following:
require 'rubygems'
require 'Nokogiri'
require 'HTTParty'
require 'Pry'
require 'csv'
# this is how we request the page we're going to scrape
page = HTTParty.get('https://newyork.craigslist.org/search/pet?s=0')
Pry.start(binding)
When I try to run the ruby test script, I get the following error:
pjw#ubuntu:~/ruby/test$ ruby test.rb
/home/pjw/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- HTTParty (LoadError)
from /home/pjw/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from test.rb:1:in `<main>'
I've verified HTTParty works properly by running:
httparty "https://newyork.craigslist.org/search/pet?s=0"
The problem seems to be the require statement. If I mix the order or the required gems, the first one gives the same error as above. I've searched online and can't seem to find what I'm missing...
in `require': cannot load such file -- httparty (LoadError) - (No Answer)
kernel_require.rb:55:in `require': cannot load such file error - (bundle exec ruby test.rb "Could not locate Gemfile or .bundle/ directory")
Unable to run .rb files on mac - getting /.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require' - (GEMS already Installed)
pjw#ubuntu:~/ruby/test$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
pjw#ubuntu:~/ruby/test$ ruby -v
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
pjw#ubuntu:~/ruby/test$ gem list
*** LOCAL GEMS ***
actioncable (5.0.0.1)
actionmailer (5.0.0.1)
actionpack (5.0.0.1)
actionview (5.0.0.1)
activejob (5.0.0.1)
activemodel (5.0.0.1)
activerecord (5.0.0.1)
activesupport (5.0.0.1)
addressable (2.5.0)
arel (7.1.4)
autoprefixer-rails (6.5.3, 6.5.2, 6.5.1)
bcrypt (3.1.11)
bigdecimal (default: 1.2.8)
bootstrap (4.0.0.alpha5)
bootstrap-datepicker-rails (1.6.4.1)
bootstrap-sass (3.3.7)
builder (3.2.2)
bundler (1.13.6)
bundler-unload (1.0.2)
byebug (9.0.6)
cancancan (1.15.0)
coderay (1.1.1)
coffee-rails (4.2.1)
coffee-script (2.4.1)
coffee-script-source (1.10.0)
commonjs (0.2.7)
concurrent-ruby (1.0.2)
connection_pool (2.2.1, 2.2.0)
dashing-rails (2.5.0)
debug_inspector (0.0.2)
devise (4.2.0)
did_you_mean (1.0.2, 1.0.0)
erubis (2.7.0)
execjs (2.7.0)
executable-hooks (1.3.2)
ffi (1.9.14)
figaro (1.1.1)
gem-wrappers (1.2.7)
geocoder (1.4.0)
globalid (0.3.7)
gravatarify (3.1.1)
httparty (0.14.0)
i18n (0.7.0)
io-console (0.4.6, default: 0.4.5)
jbuilder (2.6.0)
jquery-rails (4.2.1)
json (2.0.2, default: 1.8.3)
less (2.6.0)
less-rails (2.8.0)
listen (3.1.5, 3.0.8)
loofah (2.0.3)
mail (2.6.4)
method_source (0.8.2)
mime-types (3.1)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.9.1, 5.8.3)
multi_json (1.12.1)
multi_xml (0.5.5)
net-telnet (0.1.1)
nio4r (1.2.1)
nokogiri (1.6.8.1)
orm_adapter (0.5.0)
power_assert (0.3.1, 0.2.6)
pry (0.10.4)
psych (2.1.1, default: 2.0.17)
public_activity (1.5.0)
public_suffix (2.0.4)
puma (3.6.0)
rack (2.0.1)
rack-test (0.6.3)
rails (5.0.0.1)
rails-dom-testing (2.0.1)
rails-html-sanitizer (1.0.3)
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
railties (5.0.0.1)
rake (11.3.0, 10.4.2)
rb-fsevent (0.9.8)
rb-inotify (0.9.7)
rdoc (5.0.0, default: 4.2.1)
redis (3.3.1)
responders (2.3.0)
ruby_dep (1.5.0)
rubygems-bundler (1.4.4)
rubygems-update (2.6.8)
rufus-scheduler (3.2.2)
rvm (1.11.3.9)
sass (3.4.22)
sass-rails (5.0.6)
simple_calendar (2.2.0)
simple_form (3.3.1)
slop (4.4.1, 3.6.0)
spring (2.0.0)
spring-watcher-listen (2.0.1)
sprockets (3.7.0)
sprockets-rails (3.2.0)
sqlite3 (1.3.12)
table_print (1.5.6)
test-unit (3.2.2, 3.1.5)
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.5)
turbolinks (5.0.1)
turbolinks-source (5.0.0)
twitter-bootstrap-rails (3.2.2)
tzinfo (1.2.2)
uglifier (3.0.3, 3.0.2)
warden (1.2.6)
web-console (3.4.0, 3.3.1)
websocket-driver (0.6.4)
websocket-extensions (0.1.2)
wunderground (1.2.0)
Try simply this. It's all downcase
require 'httparty'
ubuntu#ip-172-31-19-199:~/ruby$ sudo apt install ruby-httparty
Install ruby-httparty and you won't get the error.

rspec-expectations-2.99.0/lib/rspec/matchers/built_in/raise_error.rb:5: uninitialized constant RSpec::Matchers::BuiltIn::RaiseError::MatchAliases

Output error from running rspec in my cookbook directory.
C:\Users\a540409\IdeaProjects\stores-v2\chef>bundle exec rspec
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-expectations-2.99.0/lib/rspec/matchers/built_in/raise_error.rb:5:in `<class:RaiseError>': uninitialized constant RSpec::Matchers::BuiltIn::Rais
eError::MatchAliases (NameError)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-expectations-2.99.0/lib/rspec/matchers/built_in/raise_error.rb:4:in `<module:BuiltIn>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-expectations-2.99.0/lib/rspec/matchers/built_in/raise_error.rb:3:in `<module:Matchers>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-expectations-2.99.0/lib/rspec/matchers/built_in/raise_error.rb:2:in `<module:RSpec>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-expectations-2.99.0/lib/rspec/matchers/built_in/raise_error.rb:1:in `<top (required)>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/chefspec-3.4.0/lib/chefspec/expect_exception.rb:1:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/chefspec-3.4.0/lib/chefspec/expect_exception.rb:1:in `<top (required)>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/chefspec-3.4.0/lib/chefspec.rb:26:in `require_relative'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/chefspec-3.4.0/lib/chefspec.rb:26:in `<top (required)>'
from C:/Users/a540409/IdeaProjects/stores-v2/chef/spec/default_spec.rb:1:in `require'
from C:/Users/a540409/IdeaProjects/stores-v2/chef/spec/default_spec.rb:1:in `<top (required)>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.0/lib/rspec/core/configuration.rb:1065:in `load'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.0/lib/rspec/core/configuration.rb:1065:in `block in load_spec_files'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.0/lib/rspec/core/configuration.rb:1065:in `each'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.0/lib/rspec/core/configuration.rb:1065:in `load_spec_files'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.0/lib/rspec/core/command_line.rb:18:in `run'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.0/lib/rspec/core/runner.rb:89:in `run'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.0/lib/rspec/core/runner.rb:17:in `block in autorun'
I tried using require 'rspec/expectations' based on this but that didn’t help. Tried running using chefdk for windows. But the same issue
Here is my gem list.
C:\Users\a540409\IdeaProjects\stores-v2\chef>gem list
*** LOCAL GEMS ***
activesupport (3.2.18)
addressable (2.3.6)
akami (1.2.2)
archive-tar-minitar (0.5.2)
berkshelf (3.1.3, 3.0.1, 2.0.17)
berkshelf-api-client (1.2.0)
bigdecimal (1.1.0)
buff-config (1.0.0, 0.4.0)
buff-extensions (1.0.0, 0.5.0)
buff-ignore (1.1.1)
buff-ruby_engine (0.1.0)
buff-shell_out (0.1.1)
builder (3.2.2)
bundler (1.6.3)
celluloid (0.16.0.pre, 0.15.2)
celluloid-io (0.16.0.pre, 0.15.0)
chef (11.12.0 x86-mingw32, 11.6.0)
chef-zero (2.2, 2.1.5, 2.0.2)
chefspec (4.0.0, 3.4.0)
chozo (0.6.1)
coderay (1.1.0)
columnize (0.8.9)
dep-selector-libgecode (1.0.1)
dep_selector (1.0.3)
diff-lcs (1.2.5)
em-winrm (0.5.5)
erubis (2.7.0)
eventmachine (1.0.3 x86-mingw32)
excon (0.37.0)
faraday (0.9.0, 0.8.9)
fauxhai (2.1.2)
ffi (1.9.3 x86-mingw32, 1.9.0 x86-mingw32, 1.5.0 x86-mingw32)
fog (1.22.1)
fog-brightbox (0.0.2)
fog-core (1.22.0)
fog-json (1.0.0)
foodcritic (4.0.0)
formatador (0.2.5)
gherkin (2.12.2 x86-mingw32)
gssapi (1.0.3)
gyoku (1.1.1)
hashie (3.0.0, 2.1.2)
highline (1.6.21)
hitimes (1.2.1)
httpclient (2.4.0)
httpi (0.9.7)
i18n (0.6.9)
io-console (0.3)
ipaddress (0.8.0)
json (1.8.1, 1.7.7, 1.5.5)
kitchen-vagrant (0.15.0)
knife-openstack (0.10.0)
knife-windows (0.6.0)
linecache19 (0.5.12)
little-plugger (1.1.3)
logging (1.8.2)
method_source (0.8.2)
mime-types (1.25.1)
mini_portile (0.6.0)
minitar (0.5.4)
minitest (2.5.1)
mixlib-authentication (1.3.0)
mixlib-cli (1.5.0, 1.3.0)
mixlib-config (2.1.0)
mixlib-log (1.6.0)
mixlib-shellout (1.4.0 x86-mingw32, 1.2.0 x86-mingw32)
multi_json (1.10.1)
multipart-post (2.0.0, 1.2.0)
net-http-persistent (2.9.4)
net-scp (1.2.1)
net-ssh (2.9.1)
net-ssh-gateway (1.2.0)
net-ssh-multi (1.2.0, 1.1)
nio4r (1.0.0)
nokogiri (1.6.2.1 x86-mingw32)
nori (1.1.5)
octokit (3.1.2, 2.7.2)
ohai (7.0.4)
polyglot (0.3.5)
pry (0.10.0 i386-mingw32)
rack (1.5.2)
rake (10.3.2, 0.9.2.2)
rbzip2 (0.2.0)
rdoc (3.9.5)
rdp-ruby-wmi (0.3.1)
rest-client (1.6.7)
retryable (1.3.5)
ridley (4.0.0, 3.1.0, 1.7.1)
rspec (3.0.0, 2.99.0)
rspec-core (3.0.2, 3.0.1, 2.99.0)
rspec-expectations (3.0.2, 3.0.1, 2.99.0)
rspec-its (1.0.1)
rspec-mocks (3.0.2, 3.0.1, 2.99.1)
rspec-support (3.0.2, 3.0.0, 3.0.0.rc1)
ruby-debug-base19x (0.11.30.pre3)
ruby-debug-ide (0.4.17)
ruby-wmi (0.4.0)
ruby_core_source (0.1.5)
rubyntlm (0.1.1)
rufus-lru (1.0.5)
safe_yaml (1.0.3, 0.9.7)
savon (0.9.5)
sawyer (0.5.4)
semverse (1.1.0)
slop (3.5.0)
solve (1.2.0, 0.8.2)
systemu (2.5.2)
test-kitchen (1.2.1, 1.1.0)
thor (0.19.1, 0.18.1)
timers (3.0.0, 2.0.0, 1.1.0)
treetop (1.5.3)
uuidtools (2.1.4)
varia_model (0.4.0, 0.3.2)
wasabi (1.0.0)
win32-api (1.5.1 universal-mingw32, 1.4.8 x86-mingw32)
win32-dir (0.4.5)
win32-event (0.6.1)
win32-ipc (0.6.1)
win32-mmap (0.4.0)
win32-mutex (0.4.1)
win32-process (0.7.4, 0.7.3)
win32-service (0.8.4, 0.8.2)
win32console (1.3.2 x86-mingw32)
windows-api (0.4.2)
windows-pr (1.2.3, 1.2.2)
winrm (1.1.3)
yajl-ruby (1.2.1)
My spec_helper.rb:
require 'rspec/expectations'
require 'chefspec'
require 'chefspec/berkshelf'
RSpec.configure do |config|
config.platform = 'redhat'
config.version = '6.3'
#config.log_level = :debug
end
My default_spec.rb:
require 'rspec/expectations'
require 'chefspec'
describe 'api-stores-v2::default' do
let (:chef_run) { ChefSpec::Runner.new.converge 'api-stores-v2::default' }
it 'installs dependent packages' do
expect(chef_run).to include_recipe('java')
end
end
You have ChefSpec 4.0 installed, but your bundler is picking up an older version. RSpec 2.99 broken backwards-compatibility, so you need to upgrade to ChefSpec 4.0.
gem 'chefspec', '~> 4.0'

Ruby complaining it could not find builder?

I reinstalled rmagick and mini_magick using gem install, and after that, running a ruby script I need to fix, I get the following errors:
/Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find builder (~> 3.0.0) amongst [Ascii85-1.0.2, actionpack-3.2.12, activemodel-3.2.12, activerecord-3.2.12, activerecord-mysql2-adapter-0.0.3, activesupport-3.2.12, addressable-2.3.3, afm-0.2.0, archive-tar-minitar-0.5.2, arel-3.0.2, aws-s3-0.6.3, aws-ses-0.4.4, builder-3.1.4, bundler-1.2.4, columnize-0.3.6, cookiejar-0.3.0, daemon-kit-0.2.1, diff-lcs-1.2.1, em-http-request-1.0.3, em-socksify-0.2.1, em-synchrony-1.0.3, erubis-2.7.0, eventmachine-1.0.0, factory_girl-4.2.0, god-0.13.1, hashery-2.1.0, hike-1.2.1, http_parser.rb-0.5.3, i18n-0.6.1, journey-1.0.4, linecache19-0.5.12, little-plugger-1.1.3, logging-1.8.1, mail-2.5.3, mailfactory-1.4.0, mime-types-1.21, mini_magick-3.5.0, multi_json-1.6.1, mysql2-0.3.11, pdf-reader-1.3.1, polyglot-0.3.3, prawn-0.12.0, prawn-fast-png-0.2.3, rack-1.5.1, rack-cache-1.2, rack-protection-1.3.2, rack-test-0.6.2, rake-10.0.3, redis-3.0.2, redis-namespace-1.2.1, resque-1.23.0, rmagick-2.13.2, rspec-2.12.0, rspec-core-2.12.2, rspec-expectations-2.12.1, rspec-mocks-2.12.2, rubigen-1.5.8, ruby-debug-base19-0.11.25, ruby-debug-base19x-0.11.29, ruby-debug-ide-0.4.16, ruby-rc4-0.1.5, ruby_core_source-0.1.5, rubygems-bundler-1.1.0, rufus-scheduler-2.0.17, rvm-1.11.3.6, safe_attributes-1.0.9, safely-0.3.2, sinatra-1.3.4, sprockets-2.8.2, state_machine-1.1.2, subexec-0.2.2, tenderlove-frex-1.0.1.20090313144615, thor-0.17.0, tilt-1.3.3, treetop-1.4.12, ttfunk-1.0.3, tzinfo-0.3.35, vegas-0.1.11, xml-simple-1.1.2] (Gem::LoadError)
from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:778:in `block in activate_dependencies'
from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:767:in `each'
from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:767:in `activate_dependencies'
from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:751:in `activate'
from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:781:in `block in activate_dependencies'
from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:767:in `each'
from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:767:in `activate_dependencies'
from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:751:in `activate'
from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems.rb:212:in `rescue in try_activate'
from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems.rb:209:in `try_activate'
from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
from /Users/.../.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from ./q_test.rb:4:in `<main>'
I have the following gems installed on my rvm gemset:
actionpack (3.2.12)
activemodel (3.2.12)
activerecord (3.2.12)
activerecord-mysql2-adapter (0.0.3)
activesupport (3.2.12)
addressable (2.3.3)
afm (0.2.0)
archive-tar-minitar (0.5.2)
arel (3.0.2)
Ascii85 (1.0.2)
aws-s3 (0.6.3)
aws-ses (0.4.4)
builder (3.1.4)
bundler (1.2.4)
columnize (0.3.6)
cookiejar (0.3.0)
daemon-kit (0.2.1)
diff-lcs (1.2.1)
em-http-request (1.0.3)
em-socksify (0.2.1)
em-synchrony (1.0.3)
erubis (2.7.0)
eventmachine (1.0.0)
factory_girl (4.2.0)
god (0.13.1)
hashery (2.1.0)
hike (1.2.1)
http_parser.rb (0.5.3)
i18n (0.6.1)
journey (1.0.4)
linecache19 (0.5.12)
little-plugger (1.1.3)
logging (1.8.1)
mail (2.5.3)
mailfactory (1.4.0)
mime-types (1.21)
mini_magick (3.5.0)
multi_json (1.6.1)
mysql2 (0.3.11)
pdf-reader (1.3.1)
polyglot (0.3.3)
prawn (0.12.0)
prawn-fast-png (0.2.3)
rack (1.5.1)
rack-cache (1.2)
rack-protection (1.3.2)
rack-test (0.6.2)
rake (10.0.3)
redis (3.0.2)
redis-namespace (1.2.1)
resque (1.23.0)
rmagick (2.13.2)
rspec (2.12.0)
rspec-core (2.12.2)
rspec-expectations (2.12.1)
rspec-mocks (2.12.2)
rubigen (1.5.8)
ruby-debug-base19 (0.11.25)
ruby-debug-base19x (0.11.29)
ruby-debug-ide (0.4.16)
ruby-rc4 (0.1.5)
ruby_core_source (0.1.5)
rubygems-bundler (1.1.0)
rufus-scheduler (2.0.17)
rvm (1.11.3.6)
safe_attributes (1.0.9)
safely (0.3.2)
sinatra (1.3.4)
sprockets (2.8.2)
state_machine (1.1.2)
subexec (0.2.2)
tenderlove-frex (1.0.1.20090313144615)
thor (0.17.0)
tilt (1.3.3)
treetop (1.4.12)
ttfunk (1.0.3)
tzinfo (0.3.35)
vegas (0.1.11)
xml-simple (1.1.2)
No idea why this is happening? It was working up to the point where I removed and reinstalled rmagick?
You need builder 3.0.x while you have builder 3.1.4 installed.
It says "Could not find builder (~> 3.0.0)". The "~>" marks "pessimistic version constraint" (described here http://docs.rubygems.org/read/chapter/16#page74 ) which simply means "don't care about the last digit". So, any 3.0.x will suite, but 3.1.x won't.

Unable to run vmc do to gem version dependency confusion

I just need to know what commands to run to install/uninstall the right gems such that vmc will work. I keep attepmting to meet the dependency requirments of the gem by install cfoundry by get the below error when i run vmc:
Howards-iMac:~ Howard$ vmc
/Users/Howard/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1990:in `raise_if_conflicts': Unable to activate tunnel-vmc-plugin-0.2.0, because cfoundry-0.4.21 conflicts with cfoundry (~> 0.5.0) (Gem::LoadError)
from /Users/Howard/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1163:in `activate'
from /Users/Howard/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems.rb:181:in `rescue in try_activate'
from /Users/Howard/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems.rb:178:in `try_activate'
from /Users/Howard/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:109:in `rescue in require'
from /Users/Howard/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in `require'
from /Users/Howard/.rvm/gems/ruby-2.0.0-p0/gems/vmc-0.4.7/lib/vmc/plugin.rb:43:in `block in load_all'
from /Users/Howard/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/set.rb:232:in `each_key'
from /Users/Howard/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/set.rb:232:in `each'
from /Users/Howard/.rvm/gems/ruby-2.0.0-p0/gems/vmc-0.4.7/lib/vmc/plugin.rb:42:in `load_all'
from /Users/Howard/.rvm/gems/ruby-2.0.0-p0/gems/vmc-0.4.7/bin/vmc:9:in `<top (required)>'
from /Users/Howard/.rvm/gems/ruby-2.0.0-p0/bin/vmc:23:in `load'
from /Users/Howard/.rvm/gems/ruby-2.0.0-p0/bin/vmc:23:in `<main>'
Howards-iMac:~ Howard$
Running gem list I have:
actionmailer (3.2.12, 3.2.11)
actionpack (3.2.12, 3.2.11)
activemodel (3.2.12, 3.2.11)
activerecord (3.2.12, 3.2.11)
activeresource (3.2.12, 3.2.11)
activesupport (3.2.12, 3.2.11)
addressable (2.3.3, 2.3.2, 2.2.8)
arel (3.0.2)
async_sinatra (0.5.0)
bcrypt-ruby (3.0.1)
better_errors (0.7.0, 0.3.2)
bigdecimal (1.2.0)
binding_of_caller (0.7.1)
bootstrap-sass (2.2.2.0)
builder (3.2.0, 3.0.4)
bundler (1.3.0)
caldecott-client (0.0.2)
cancan (1.6.8)
capybara (2.0.2)
cf-uaa-lib (1.3.7)
cfoundry (0.4.21)
childprocess (0.3.7)
clouseau (0.0.2)
coderay (1.0.9, 1.0.8)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.4.0)
cucumber (1.2.1)
cucumber-rails (1.3.0)
daemons (1.1.9)
database_cleaner (0.9.1)
debug_inspector (0.0.2)
devise (2.2.3)
diff-lcs (1.1.3)
em-http-request (0.3.0)
em-websocket (0.3.8)
email_spec (1.4.0)
erubis (2.7.0)
escape_utils (0.3.2)
eventmachine (1.0.0)
execjs (1.4.0)
factory_girl (4.2.0)
factory_girl_rails (4.2.0)
ffi (1.3.1)
figaro (0.5.3)
gherkin (2.11.6)
google_visualr (2.1.6)
hike (1.2.1)
hominid (3.0.5)
hub (1.10.4)
i18n (0.6.4, 0.6.1)
interact (0.5.2)
io-console (0.4.2)
journey (1.0.4)
jquery-datatables-rails (1.11.2)
jquery-rails (2.2.0)
json (1.7.7, 1.7.6)
json_pure (1.6.8)
launchy (2.1.2)
mail (2.5.3, 2.4.4)
manifests-vmc-plugin (0.4.19)
mime-types (1.21, 1.19)
minitest (4.6.2, 4.3.2)
mothership (0.5.1, 0.3.5)
multi_json (1.6.1, 1.5.0, 1.4.0)
multipart-post (1.2.0)
mysql2 (0.3.11)
nokogiri (1.5.6)
orm_adapter (0.4.0)
polyglot (0.3.3)
psych (2.0.0)
quiet_assets (1.0.1)
rack (1.5.2, 1.4.5, 1.4.4)
rack-cache (1.2)
rack-protection (1.4.0)
rack-ssl (1.3.3)
rack-test (0.6.2)
rails (3.2.12, 3.2.11)
railties (3.2.12, 3.2.11)
rake (10.0.3, 0.9.6)
rdoc (4.0.0, 3.12.2, 3.12)
rest-client (1.6.7)
rolify (3.2.0)
rspec-core (2.12.2)
rspec-expectations (2.12.1)
rspec-mocks (2.12.2)
rspec-rails (2.12.2)
rubyzip (0.9.9)
sass (3.2.5)
sass-rails (3.2.6)
selenium-webdriver (2.29.0)
simple_form (2.0.4)
sinatra (1.3.5)
sprockets (2.9.0, 2.2.2)
test-unit (2.5.4, 2.0.0.0)
thin (1.5.0)
thor (0.17.0)
tilt (1.3.4, 1.3.3)
treetop (1.4.12)
tunnel-dummy-vmc-plugin (0.0.2)
tunnel-vmc-plugin (0.2.0)
tzinfo (0.3.35)
uglifier (1.3.0)
uuidtools (2.1.3)
vmc (0.4.7)
warden (1.2.1)
websocket (1.0.7)
xpath (1.0.0)
yaml_db (0.2.3)
To uninstall specific version:
gem uninstall cfoundry --version '> 0.4.21'
To install specific version:
gem install cfoundry --version '> 0.5'

Clean up my RoR development environment

I started RoR development a few months ago, and being new to Mac...
Time flies and now I have a lot different ruby versions, rails versions and gems versions located everywhere......And currently I installed rvm and things got even worst, all things messed!
And so I started want to clean all things and use rvm again! I want to uninstall all gems, all rails, and all ruby versions, except the system's default one (the very old one born with the mac).
Or any other better solutions or suggestions!? Please help!
there is some info that I think will be useful:
which -a ruby
/opt/local/bin/ruby
/opt/local/bin/ruby
/usr/local/bin/ruby
/usr/bin/ruby
/usr/local/bin/ruby
which -a rails
/usr/local/bin/rails
/usr/bin/rails
/usr/local/bin/rails
which -a compass # simliar for rspec and many other gems
/usr/local/bin/compass
/usr/local/bin/compass
gem list
*** LOCAL GEMS ***
abstract (1.0.0)
actionmailer (3.0.3, 3.0.1, 3.0.0, 3.0.0.rc2, 2.3.9, 2.3.5, 2.3.4)
actionpack (3.0.3, 3.0.1, 3.0.0, 3.0.0.rc2, 2.3.9, 2.3.5, 2.3.4)
activemodel (3.0.3, 3.0.1, 3.0.0, 3.0.0.rc2)
activerecord (3.0.3, 3.0.1, 3.0.0, 3.0.0.rc2, 2.3.9, 2.3.5, 2.3.4)
activeresource (3.0.3, 3.0.1, 3.0.0, 3.0.0.rc2, 2.3.9, 2.3.5, 2.3.4)
activesupport (3.0.3, 3.0.1, 3.0.0, 3.0.0.rc2, 2.3.9, 2.3.5, 2.3.4)
addressable (2.2.2)
arel (2.0.6, 1.0.1, 1.0.0.rc1)
authlogic (2.1.6, 2.1.3)
aws-s3 (0.6.2)
base32 (0.1.2)
block_helpers (0.3.3)
bluecloth (2.0.9)
bowline (0.9.4)
bowline-bundler (0.0.4)
bson (1.1.2)
builder (2.1.2)
bundler (1.0.2, 1.0.0)
compass (0.10.6)
crack (0.1.7)
devise (1.1.3)
diff-lcs (1.1.2)
differ (0.1.1)
dynamic_form (1.1.3)
engineyard (1.3.1)
engineyard-serverside-adapter (1.3.3)
erubis (2.6.6)
escape (0.0.4)
extlib (0.9.15)
facebooker (1.0.75)
faker (0.3.1)
faraday (0.5.3, 0.5.2)
fast_gettext (0.5.10, 0.4.17)
fastercsv (1.5.3)
fastthread (1.0.7)
ffi (0.6.3)
formatize (1.0.1)
formtastic (1.1.0, 1.0.1)
gemcutter (0.5.0)
gettext (2.1.0)
git (1.2.5)
gosu (0.7.25 universal-darwin)
haml (3.0.24, 3.0.23, 3.0.22, 3.0.21, 3.0.18)
haml-rails (0.3.4)
heroku (1.10.13, 1.9.13)
highline (1.5.2)
hirb (0.3.4, 0.3.3)
hpricot (0.8.2)
i18n (0.5.0, 0.4.2, 0.4.1, 0.3.7)
jeweler (1.4.0)
json (1.4.6)
json_pure (1.4.3)
linkedin (0.1.8)
locale (2.0.5)
mail (2.2.12, 2.2.11, 2.2.10, 2.2.9, 2.2.7, 2.2.6.1)
memcache-client (1.8.5)
meta_search (0.9.8, 0.9.7.2, 0.9.7.1, 0.9.6, 0.9.4)
mime-types (1.16)
mongo (1.1.2)
mongoid (2.0.0.beta.20)
multi_json (0.0.5)
multipart-post (1.0.1)
mysql (2.8.1)
mysql2 (0.2.6, 0.2.4, 0.2.3)
net-ldap (0.1.1)
nice-ffi (0.4)
nokogiri (1.4.4, 1.4.2)
oa-basic (0.1.6)
oa-core (0.1.6)
oa-enterprise (0.1.6)
oa-oauth (0.1.6)
oa-openid (0.1.6)
oauth (0.4.4, 0.4.3, 0.4.1)
oauth-plugin (0.4.0.pre1)
oauth2 (0.1.0)
omniauth (0.1.6)
paperclip (2.3.6, 2.3.4, 2.3.1.1)
passenger (2.2.12)
polyglot (0.3.1)
pyu-ruby-sasl (0.0.3.2)
querybuilder (0.9.2, 0.5.9)
rack (1.2.1, 1.1.0, 1.0.1)
rack-cache (0.5.3)
rack-cache-purge (0.0.2, 0.0.1)
rack-mount (0.6.13)
rack-openid (1.2.0)
rack-test (0.5.6, 0.5.4)
railroady (0.11.2)
rails (3.0.3, 3.0.1, 3.0.0, 3.0.0.rc2, 2.3.9, 2.3.5, 2.3.4)
railties (3.0.3, 3.0.1, 3.0.0, 3.0.0.rc2)
rake (0.8.7)
RedCloth (3.0.4)
rest-client (1.6.1)
roxml (3.1.5)
rscribd (1.2.0)
rspec (2.3.0, 2.2.0, 2.1.0, 2.0.1)
rspec-core (2.3.0, 2.2.1, 2.1.0, 2.0.1)
rspec-expectations (2.3.0, 2.2.0, 2.1.0, 2.0.1)
rspec-mocks (2.3.0, 2.2.0, 2.1.0, 2.0.1)
rspec-rails (2.3.0, 2.2.0, 2.1.0, 2.0.1)
ruby-hmac (0.4.0)
ruby-mysql (2.9.3)
ruby-ole (1.2.10.1)
ruby-openid (2.1.8)
ruby-openid-apps-discovery (1.2.0)
ruby-recaptcha (1.0.2, 1.0.0)
ruby-sdl-ffi (0.3)
ruby-termios (0.9.6)
ruby_parser (2.0.5)
rubyforge (2.0.4)
rubygame (2.6.4)
rubygems-update (1.3.7)
rubyless (0.7.0, 0.6.0, 0.3.5)
rubyntlm (0.1.1)
rubyzip2 (2.0.1)
scribd_fu (2.0.6)
searchlogic (2.4.27, 2.4.23)
sequel (3.16.0, 3.15.0, 3.13.0)
sexp_processor (3.0.5)
shoulda (2.11.3)
sinatra (1.0)
slim (0.8.0)
slim-rails (0.1.2)
spreadsheet (0.6.4.1)
sqlite3-ruby (1.3.2, 1.3.1)
ssl_requirement (0.1.0)
subdomain-fu (1.0.0.beta2, 0.5.4)
supermodel (0.1.4)
syntax (1.0.0)
taps (0.3.13, 0.3.11)
templater (1.0.0)
temple (0.1.6)
text-format (1.0.0)
text-hyphen (1.0.0)
thor (0.14.6, 0.14.4, 0.14.3, 0.14.1, 0.14.0)
tilt (1.1)
treetop (1.4.9, 1.4.8)
tzinfo (0.3.23)
uuidtools (2.1.1, 2.0.0)
validates_timeliness (3.0.0.beta.4, 2.3.1)
warden (0.10.7)
will_paginate (3.0.pre2, 2.3.15, 2.3.14)
xml-simple (1.0.12)
ya2yaml (0.30)
yajl-ruby (0.7.8, 0.7.7)
yamltest (0.7.0)
zena (0.16.9, 0.16.8)
======
I have ran sudo rvm implode and sudo rm -rf ~/.rvm, so no rvm now.
gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.2.0]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-darwin-10
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.8
- /Users/peter/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://rubygems.org/", "http://gems.github.com"]
- REMOTE SOURCES:
- http://rubygems.org/
- http://gems.github.com
===
ls -al /usr/local/lib/
total 5704
drwxr-xr-x 7 root wheel 238 Jun 1 2010 .
drwxr-xr-x 9 root wheel 306 Dec 15 16:20 ..
-rw-r--r-- 1 root wheel 1717208 Jun 1 2010 libruby-static.a
-rwxr-xr-x 1 root wheel 1191880 Jun 1 2010 libruby.1.8.7.dylib
lrwxrwxrwx 1 root wheel 19 Jun 1 2010 libruby.1.8.dylib -> libruby.1.8.7.dylib
lrwxrwxrwx 1 root wheel 19 Jun 1 2010 libruby.dylib -> libruby.1.8.7.dylib
drwxr-xr-x 6 root wheel 204 Jun 1 2010 ruby
Wow, um... you've been ... ah ... busy. Trying to clean things up will be a challenge and will probably be more than we can help with unless we can see into a lot of the system directories and your account's configuration.
My first question is: Have you made any changes to the system's default Ruby in /usr/bin/ruby? If so, I'd personally just back up the data I want to keep and wipe the drive and start over.
Have you run gem clean? That will remove a bunch of garbage, but will also probably raise a lot of questions about dependencies, and, when done, could leave things broken or unchanged - it's hard to say with that number of gems and revisions what will happen.
You can force gem to uninstall all the gems using something like:
gem list | awk '{print $1}' | xargs gem --all --quiet uninstall
Just be sure which Ruby version is running, because gem will act against the currently running Ruby. Use which ruby to find out.

Resources