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'
Related
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'
I work on JetBrains RubyMine 5.4.3.2.1 with Ruby193. I used to debug all the time until rubymine popped up an update for ruby-debug and I clicked yes. Ever since that update I tried to reinstall previous versions and I get this error:
Failed to Install Gems. Following gems were not installed:
C:\Program Files (x86)\JetBrains\RubyMine 5.4.2\rb\gems\ruby-debug-base19x-0.11.30.pre12.gem:
Error installing ruby-debug-base19x-0.11.30.pre12.gem:
ERROR: Failed to build gem native extension. C:/Ruby193/bin/ruby.exe extconf.rb C:/Ruby193/bin/ruby.exe: No such file or directory -- extconf.rb (LoadError)
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debug-base19x-0.11.30.pre12 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debug-base19x-0.11.30.pre12/ext/ruby_debug/gem_make.out
Obviously I do have the Devkit installed properly because it did work until now (tried reinstalling ruby and devkit again but no luck).
How can I fix this?
Both gems; ruby-debug and debugger; mess up debugging through RubyMine. Also, I had to manually install a version of linecache (0.5.13) to get the IDE debugging to work. Here is my gem list.
actionmailer (4.0.0, 3.2.13)
actionpack (4.0.0, 3.2.13)
activeadmin (0.6.0)
activemodel (4.0.0, 3.2.13)
activerecord (4.0.0, 3.2.13)
activerecord-deprecated_finders (1.0.3)
activerecord-import (0.4.1)
activerecord-postgresql-adapter (0.0.1)
activeresource (3.2.13)
activesupport (4.0.0, 3.2.13)
arbre (1.0.1)
archive-tar-minitar (0.5.2)
arel (4.0.0, 3.0.2)
atomic (1.1.10)
backbone-relational-rails (0.8.5, 0.7.1)
bcrypt-ruby (3.0.1)
bigdecimal (1.1.0)
bourbon (3.1.8)
builder (3.1.4, 3.0.4)
bundler (1.3.5)
childprocess (0.3.9)
climate_control (0.0.3)
cocaine (0.5.1)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.6.2)
columnize (0.3.6)
commander (4.1.3)
curb (0.8.4)
curl-multi (0.2)
daemon_controller (1.1.4)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.2.3)
devise (2.2.4)
diff-lcs (1.2.4)
eco (1.0.0)
eco-source (1.1.0.rc.1)
ejs (1.1.1)
erubis (2.7.0)
execjs (1.4.0)
fastercsv (1.5.5)
fastthread (1.0.7)
ffi (1.9.0)
foreigner (1.4.2)
formtastic (2.2.1)
has_scope (0.5.1)
highline (1.6.19)
hike (1.2.3)
httpclient (2.3.3)
i18n (0.6.4, 0.6.1)
inherited_resources (1.4.0)
io-console (0.3)
jasmine (1.3.2)
jasmine-core (1.3.1)
journey (1.0.4)
jquery-rails (2.1.4)
json (1.8.0)
kaminari (0.14.1)
linecache19 (0.5.13)
mail (2.5.4)
meta_search (1.1.3)
mime-types (1.23)
mini_portile (0.5.0)
minitest (4.7.5, 2.5.1)
modernizr (2.6.2)
modernizr-rails (2.6.2.3)
multi_json (1.7.7)
mysql2 (0.3.11)
net-ssh (2.6.8)
nokogiri (1.6.0)
open4 (1.3.0)
orm_adapter (0.4.0)
paperclip (3.4.2)
passenger (4.0.5)
pg (0.15.1)
polyamorous (0.5.0)
polyglot (0.3.3)
pr_geohash (1.0.0)
rack (1.5.2, 1.4.5)
rack-cache (1.2)
rack-ssl (1.3.3)
rack-test (0.6.2)
rails (3.2.13)
rails-backbone (0.9.10)
rails-footnotes (3.7.9)
railties (4.0.0, 3.2.13)
rake (10.0.4, 0.9.2.2)
rdoc (3.12.2, 3.9.5)
responders (0.9.3)
rhc (1.10.7)
rsolr (1.0.9)
rspec (2.13.0)
rspec-core (2.13.1)
rspec-expectations (2.13.0)
rspec-mocks (2.13.1)
rspec-rails (2.13.2)
ruby-debug-base19 (0.11.26)
ruby-debug-base19x (0.11.30.pre12)
ruby-debug-ide (0.4.17.beta17)
ruby-debug19 (0.11.6)
ruby_core_source (0.1.5)
rubygems-update (2.0.3)
RubyInline (3.12.2)
rubyzip (0.9.9)
sass (3.2.9)
sass-rails (3.2.6)
selenium-webdriver (2.33.0)
spork (0.9.2)
sprockets (2.10.0, 2.2.2)
sprockets-rails (2.0.0)
sunspot (2.0.0)
sunspot_rails (2.0.0)
sunspot_solr (2.0.0)
thor (0.18.1)
thread_safe (0.1.0)
tilt (1.4.1)
treetop (1.4.14)
tzinfo (0.3.37)
uglifier (2.1.1)
underscore-rails (1.4.4)
warden (1.2.1)
websocket (1.0.7)
ZenTest (4.9.2)
zurb-foundation (4.2.2)
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.
I forked puppet-dashboard to make add some filtering to the reports tab. I was asked to write some specs for my changes, but I'm get the following error when trying to run rake spec
/Users/gposton/src/puppet-dashboard/vendor/rails/activesupport/lib/active_support/test_case.rb:12: warning: already initialized constant Mocha
/Users/gposton/src/puppet-dashboard/vendor/rails/activesupport/lib/active_support/dependencies.rb:466:in `load_missing_constant': uninitialized constant Mocha::Standalone (NameError)
from /Users/gposton/src/puppet-dashboard/vendor/rails/activesupport/lib/active_support/dependencies.rb:106:in `const_missing'
from /Users/gposton/src/puppet-dashboard/vendor/gems/rspec-1.3.2/lib/spec/adapters/mock_frameworks/mocha.rb:12
from /Users/gposton/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /Users/gposton/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /Users/gposton/src/puppet-dashboard/vendor/rails/activesupport/lib/active_support/dependencies.rb:184:in `require'
from /Users/gposton/src/puppet-dashboard/vendor/gems/rspec-1.3.2/lib/spec/runner/options.rb:313:in `plugin_mock_framework'
from /Users/gposton/src/puppet-dashboard/vendor/gems/rspec-1.3.2/lib/spec/runner/options.rb:139:in `run_examples'
from /Users/gposton/src/puppet-dashboard/vendor/gems/rspec-1.3.2/lib/spec/runner/command_line.rb:9:in `run'
from /Users/gposton/src/puppet-dashboard/vendor/gems/rspec-1.3.2/bin/spec:5
rake aborted!
Any ideas?
Here is my configuration.
gposton:puppet-dashboard/ (master✗) $ gem list
*** LOCAL GEMS ***
actionpack (3.2.8)
activemodel (3.2.8)
activesupport (3.2.8)
ap (0.1.1)
builder (3.0.0)
bundler (1.1.3)
colorize (0.5.8)
crack (0.3.1)
daemons (1.0.10)
diff-lcs (1.1.3)
domain_name (0.5.3)
erubis (2.7.0)
factory_girl (2.6.4)
ffi (1.0.11, 0.6.3)
haml (3.1.7)
hike (1.2.1)
httparty (0.8.3)
httpclient (2.2.5)
i18n (0.6.0)
journey (1.0.4)
json (1.7.1)
libvirt (0.2.0)
mail (2.4.4)
mechanize (2.4)
metaclass (0.0.1)
mime-types (1.18)
mocha (0.12.3)
mogilefs-client (3.1.1)
multi_json (1.3.4)
multi_xml (0.4.4)
mysql (2.8.1)
net-http-digest_auth (1.2)
net-http-persistent (2.6)
net-scp (1.0.4)
net-ssh (2.3.0)
nokogiri (1.4.7)
ntlm-http (0.1.1)
polyglot (0.3.3)
rack (1.1.2)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.1)
railties (3.2.8)
rake (0.9.2.2)
rdoc (3.12)
rspec (2.11.0)
rspec-core (2.11.1)
rspec-expectations (2.11.2)
rspec-mocks (2.11.2)
rspec-rails (2.11.0)
ruby-libvirt (0.3.0)
rubygems-bundler (0.9.0)
rvm (1.11.3.3)
sass (3.2.1)
soap4r (1.5.8)
sprockets (2.1.3)
sqlite3 (1.3.6)
sys-filesystem (1.0.0, 0.3.4)
terminal-table (1.4.5)
thor (0.16.0)
thoughtbot-shoulda (2.11.1)
tilt (1.3.3)
treetop (1.4.10)
typhoeus (0.3.3)
unf (0.0.5)
unf_ext (0.0.4)
webrobots (0.0.13)
will_paginate (3.0.3)
xml-simple (1.1.1)
gposton:puppet-dashboard/ (master✗) $ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [i686-darwin11.3.0]
The code can be found on github
The easiest way to make specs work is to use Bundler.
bundle install
bundle exec rake spec
I have the following code:
require 'sinatra'
require 'datamapper'
DataMapper.setup :default, "postgres://localhost/mydb"
However, when I try and run it, I get:
LoadError: no such file to load -- dm-postgres-adapter
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:53:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:53:in `require'
/Library/Ruby/Gems/1.8/gems/dm-core-1.1.0/lib/dm-core/adapters.rb:163:in `load_adapter'
/Library/Ruby/Gems/1.8/gems/dm-core-1.1.0/lib/dm-core/adapters.rb:133:in `adapter_class'
/Library/Ruby/Gems/1.8/gems/dm-core-1.1.0/lib/dm-core/adapters.rb:13:in `new'
/Library/Ruby/Gems/1.8/gems/dm-core-1.1.0/lib/dm-core.rb:219:in `setup'
These are the gems I have installed:
* LOCAL GEMS *
abstract (1.0.0)
actionmailer (3.0.9, 3.0.5, 2.3.5, 1.3.6)
actionpack (3.0.9, 3.0.5, 2.3.5, 1.13.6)
actionwebservice (1.2.6)
activemodel (3.0.9, 3.0.5)
activerecord (3.0.9, 3.0.5, 2.3.5, 1.15.6)
activeresource (3.0.9, 3.0.5, 2.3.5)
activesupport (3.0.9, 3.0.5, 2.3.5, 1.4.4)
acts_as_ferret (0.4.3)
addressable (2.2.6, 2.2.5)
arel (2.0.10, 2.0.9)
autotest (4.4.6)
autotest-fsevent (0.2.4)
autotest-growl (0.2.9)
autotest-rails-pure (4.1.2)
bcrypt-ruby (2.1.4)
builder (2.1.2)
bundler (1.0.10)
capistrano (2.5.2)
cgi_multipart_eof_fix (2.5.0)
configuration (1.2.0)
daemons (1.0.10)
data_objects (0.10.6)
datamapper (1.1.0)
diff-lcs (1.1.2)
dm-aggregates (1.1.0)
dm-constraints (1.1.0)
dm-core (1.2.0.rc2, 1.1.0)
dm-do-adapter (1.2.0.rc2, 1.1.0)
dm-migrations (1.1.0)
dm-postgres-adapter (1.2.0.rc2, 1.1.0)
dm-serializer (1.1.0)
dm-sqlite-adapter (1.2.0.rc2, 1.1.0)
dm-timestamps (1.1.0)
dm-transactions (1.1.0)
dm-types (1.1.0)
dm-validations (1.1.0)
dnssd (0.6.0)
do_postgres (0.10.6)
do_sqlite3 (0.10.6)
erubis (2.6.6)
eventmachine (0.12.10)
ezcrypto (0.7.2)
faraday (0.6.1)
faraday_middleware (0.6.3)
fastercsv (1.5.4)
fastthread (1.0.1)
fcgi (0.8.7)
ferret (0.11.6)
gem_plugin (0.2.3)
hashie (1.0.0)
heroku (1.18.1)
highline (1.5.0)
hpricot (0.8.4, 0.6.164)
i18n (0.5.0)
json (1.5.1, 1.4.6)
launchy (0.3.7)
less (1.2.21)
libxml-ruby (1.1.2)
liquid (2.2.2)
mail (2.2.19, 2.2.15)
mime-types (1.16)
mocha (0.9.12)
mongrel (1.1.5)
multi_json (0.0.5)
multi_xml (0.2.2)
multipart-post (1.1.0)
mutter (0.5.3)
needle (1.3.0)
net-scp (1.0.1)
net-sftp (2.0.1, 1.1.1)
net-ssh (2.0.4, 1.1.4)
net-ssh-gateway (1.0.0)
nokogiri (1.4.4)
oauth (0.4.5, 0.4.4)
polyglot (0.3.1)
rack (1.2.1, 1.0.1)
rack-mount (0.6.14, 0.6.13)
rack-test (0.5.7)
rails (3.0.9, 3.0.5, 2.3.5, 1.2.6)
railties (3.0.9, 3.0.5)
rake (0.8.7, 0.8.3)
rant (0.5.7)
rash (0.3.0)
rdoc (3.9.2)
RedCloth (4.1.1)
rest-client (1.6.1)
roauth (0.0.3)
rspec (2.6.0, 2.5.0)
rspec-core (2.6.4, 2.5.1)
rspec-expectations (2.6.0, 2.5.0)
rspec-mocks (2.6.0, 2.5.0)
rspec-rails (2.6.1, 2.5.0)
ruby-openid (2.1.2)
ruby-yadis (0.3.4)
rubygems-update (1.6.0)
rubynode (0.1.5)
sequel (3.20.0)
shotgun (0.9)
simple_oauth (0.1.4)
sinatra (1.2.3, 1.0)
spork (0.9.0.rc4)
sqlite3 (1.3.3)
sqlite3-ruby (1.2.4)
stringex (1.2.2)
sys-uname (0.8.5)
taps (0.3.23)
termios (0.9.4)
thor (0.14.6)
tilt (1.2.2)
treetop (1.4.9, 1.4.5)
tweetstream (1.0.4)
twitter (1.4.0)
twitter-stream (0.1.10)
twitter4r (0.7.0)
twitter_oauth (0.4.3)
tzinfo (0.3.24)
uuidtools (2.1.2)
visionmedia-growl (1.0.3)
webrat (0.7.1)
xmpp4r (0.4)
ZenTest (4.5.0)
You should use dm-core instead of datamapper in your require line.
Are you using Bundler? Provided you have bundler set up correctly, it should already be loaded for you.
Uninstalling dm-postgres-adapter 1.2.0.rc2 fixed it.