{"action":"created","issue":{"url":"https://api.github.com/repos/sethvargo/chefspec/issues/614","labels_url":"https://api.github.com/repos/sethvargo/chefspec/issues/614/labels{/name}","comments_url":"https://api.github.com/repos/sethvargo/chefspec/issues/614/comments","events_url":"https://api.github.com/repos/sethvargo/chefspec/issues/614/events","html_url":"https://github.com/sethvargo/chefspec/issues/614","id":97026163,"number":614,"title":"Cannot find a resource for dpkg_package on chefspec version 0.6.1","user":{"login":"michaellihs","id":575011,"avatar_url":"https://avatars.githubusercontent.com/u/575011?v=3","gravatar_id":"","url":"https://api.github.com/users/michaellihs","html_url":"https://github.com/michaellihs","followers_url":"https://api.github.com/users/michaellihs/followers","following_url":"https://api.github.com/users/michaellihs/following{/other_user}","gists_url":"https://api.github.com/users/michaellihs/gists{/gist_id}","starred_url":"https://api.github.com/users/michaellihs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaellihs/subscriptions","organizations_url":"https://api.github.com/users/michaellihs/orgs","repos_url":"https://api.github.com/users/michaellihs/repos","events_url":"https://api.github.com/users/michaellihs/events{/privacy}","received_events_url":"https://api.github.com/users/michaellihs/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-24T10:54:14Z","updated_at":"2015-07-28T09:58:15Z","closed_at":"2015-07-26T20:14:12Z","body":"I have a very simple recipe:\r\n\r\n````ruby\r\ndpkg_package 'test'\r\n````\r\n\r\nand a ChefSpec test for it:\r\n\r\n````ruby\r\nrequire 'spec_helper'\r\n\r\ndescribe 'app_jenkins_master::dpkg' do\r\n\r\n  let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }\r\n\r\n  it 'runs dpkg with test' do\r\n    expect(chef_run).to install_dpkg_package('test')\r\n  end\r\n\r\nend\r\n````\r\n\r\nWhen I run `bundle exec rspec -f d -c`, I get the following error message:\r\n\r\n````\r\n================================================================================\r\nRecipe Compile Error in /var/folders/5g/19mv6nv972d1dh_6k7gs6k7r0000gp/T/d20150724-20763-kp86ot/cookbooks/app_jenkins_master/recipes/dpkg.rb\r\n================================================================================\r\n\r\nChef::Exceptions::NoSuchResourceType\r\n------------------------------------\r\nCannot find a resource for dpkg_package on chefspec version 0.6.1\r\n\r\nCookbook Trace:\r\n---------------\r\n  /var/folders/5g/19mv6nv972d1dh_6k7gs6k7r0000gp/T/d20150724-20763-kp86ot/cookbooks/app_jenkins_master/recipes/dpkg.rb:1:in `from_file'\r\n\r\nRelevant File Content:\r\n----------------------\r\n/var/folders/5g/19mv6nv972d1dh_6k7gs6k7r0000gp/T/d20150724-20763-kp86ot/cookbooks/app_jenkins_master/recipes/dpkg.rb:\r\n\r\n  1>> dpkg_package 'test'  2:  \r\n\r\n  runs dpkg with test (FAILED - 1)\r\n\r\nFailures:\r\n\r\n  1) app_jenkins_master::dpkg runs dpkg with test\r\n     Failure/Error: let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }\r\n     Chef::Exceptions::NoSuchResourceType:\r\n       Cannot find a resource for dpkg_package on chefspec version 0.6.1\r\n     # /var/folders/5g/19mv6nv972d1dh_6k7gs6k7r0000gp/T/d20150724-20763-kp86ot/cookbooks/app_jenkins_master/recipes/dpkg.rb:1:in `from_file'\r\n     # ./spec/recipe_dpkg_spec.rb:6:in `block (2 levels) in <top (required)>'\r\n     # ./spec/recipe_dpkg_spec.rb:9:in `block (2 levels) in <top (required)>'\r\n\r\nFinished in 1.48 seconds (files took 2.34 seconds to load)\r\n1 example, 1 failure\r\n\r\nFailed examples:\r\n\r\nrspec ./spec/recipe_dpkg_spec.rb:8 # app_jenkins_master::dpkg runs dpkg with test\r\n```\r\n\r\nThe interesting thing is that my ChefSpec version is not 0.6.1 as mentioned in the error message, but the following versions are installed :\r\n\r\n````\r\ngem list\r\n\r\n*** LOCAL GEMS ***\r\n\r\nactivesupport (4.2.0)\r\naddressable (2.3.8, 2.3.6, 2.3.5)\r\nbackports (3.6.4)\r\nberkshelf (3.3.0, 3.2.4, 3.2.3)\r\nberkshelf-api-client (1.3.0, 1.2.1)\r\nbigdecimal (1.2.0)\r\nblankslate (3.1.3, 2.1.2.4)\r\nbloomfilter-rb (2.1.1)\r\nbuff-config (1.0.1)\r\nbuff-extensions (1.0.0)\r\nbuff-ignore (1.1.1)\r\nbuff-ruby_engine (0.1.0)\r\nbuff-shell_out (0.2.0)\r\nbuilder (3.2.2)\r\nbundle (0.0.1)\r\nbundler (1.8.0)\r\ncelluloid (0.16.0)\r\ncelluloid-io (0.16.2)\r\nchef (12.4.1, 12.4.0, 11.16.4, 11.10.4)\r\nchef-config (12.4.1, 12.4.0)\r\nchef-zero (4.2.3, 2.2.1, 1.7.3)\r\nchefspec (4.3.0, 4.2.0, 4.1.1, 3.4.0)\r\nchunky_png (1.3.4, 1.3.3)\r\nclassifier-reborn (2.0.3)\r\ncleanroom (1.0.0)\r\ncoderay (1.1.0)\r\ncoffee-script (2.3.0)\r\ncoffee-script-source (1.9.1)\r\ncolorator (0.1)\r\ncompass (1.0.3)\r\ncompass-core (1.0.3)\r\ncompass-import-once (1.0.5)\r\ncookiejar (0.3.2)\r\ncrack (0.4.2)\r\ndaemons (1.2.2, 1.1.9)\r\ndbgit (0.0.1)\r\ndep-selector-libgecode (1.0.2, 1.0.0)\r\ndep_selector (1.0.3, 1.0.0)\r\ndiff-lcs (1.2.5)\r\nem-http-request (1.1.2)\r\nem-socksify (0.3.0)\r\nem-synchrony (1.0.3)\r\nem-websocket (0.3.8)\r\nerubis (2.7.0)\r\neventmachine (1.0.7, 1.0.3)\r\nexecjs (2.4.0)\r\nfaraday (0.9.1)\r\nfast-stemmer (1.0.2)\r\nfauxhai (2.3.0, 2.2.0, 2.1.0)\r\nffi (1.9.10, 1.9.8, 1.9.7, 1.9.6)\r\nffi-yajl (2.2.2, 2.2.1, 2.2.0, 1.3.1)\r\nfoodcritic (4.0.0, 3.0.3)\r\ngemoji (2.1.0)\r\ngherkin (2.12.2, 2.11.8)\r\ngithub-pages (33)\r\ngithub-pages-health-check (0.2.2)\r\ngitlab (3.4.1, 3.4.0)\r\ngli (2.13.0, 2.9.0)\r\nhashie (2.1.2)\r\nhighline (1.7.2, 1.6.21)\r\nhitimes (1.2.2)\r\nhtml-pipeline (1.9.0)\r\nhtmlentities (4.3.3, 4.3.2, 4.3.1)\r\nhttp_parser.rb (0.6.0)\r\nhttparty (0.13.5)\r\nhttpclient (2.6.0.1)\r\ni18n (0.7.0)\r\nio-console (0.4.2)\r\nipaddress (0.8.0)\r\njekyll (2.5.3, 2.4.0)\r\njekyll-coffeescript (1.0.1)\r\njekyll-gist (1.1.0)\r\njekyll-mentions (0.2.1)\r\njekyll-paginate (1.1.0)\r\njekyll-redirect-from (0.6.2)\r\njekyll-sass-converter (1.3.0, 1.2.0)\r\njekyll-sitemap (0.6.3)\r\njekyll-watch (1.2.1)\r\njemoji (0.4.0)\r\njson (1.8.3, 1.8.2, 1.8.1, 1.7.7)\r\nkitchen-vagrant (0.15.0)\r\nknife-cookbook-doc (0.15.0, 0.10.0)\r\nknife-cookbook-readme (0.2.1)\r\nkramdown (1.6.0, 1.5.0)\r\nlibrarian (0.1.2)\r\nlibrarian-chef (0.0.4)\r\nlibyajl2 (1.2.0)\r\nliquid (2.6.2, 2.6.1)\r\nlisten (2.9.0)\r\nlolcat (42.1.0)\r\nmaruku (0.7.0)\r\nmercenary (0.3.5)\r\nmethod_source (0.8.2)\r\nmime-types (2.6.1, 1.25.1)\r\nmini_portile (0.6.2, 0.6.1, 0.6.0, 0.5.2)\r\nminitar (0.5.4)\r\nminitest (5.5.1, 4.3.2)\r\nmixlib-authentication (1.3.0)\r\nmixlib-cli (1.5.0, 1.4.0)\r\nmixlib-config (2.2.1, 2.1.0)\r\nmixlib-log (1.6.0)\r\nmixlib-shellout (2.1.0, 2.0.0, 1.6.1, 1.4.0)\r\nmoneta (0.6.0)\r\nmulti_json (1.11.2, 1.11.1, 1.11.0, 1.10.1, 1.9.2)\r\nmulti_xml (0.5.5)\r\nmultipart-post (2.0.0)\r\nnet-dns (0.8.0)\r\nnet-http-persistent (2.9.4)\r\nnet-scp (1.2.1)\r\nnet-ssh (2.9.2, 2.9.1, 2.8.0)\r\nnet-ssh-gateway (1.2.0)\r\nnet-ssh-multi (1.2.1, 1.2.0)\r\nnet-telnet (0.1.1)\r\nnio4r (1.1.1, 1.1.0)\r\nnokogiri (1.6.6.2, 1.6.5, 1.6.3.1, 1.6.1, 1.5.11)\r\noctokit (3.8.0, 3.7.0)\r\nohai (8.5.0, 7.4.0, 6.22.0)\r\npaint (0.8.7)\r\nparallel (1.6.0, 1.0.0)\r\nparslet (1.7.0, 1.5.0)\r\npdfkit (0.5.4)\r\nplist (3.1.0)\r\npolyglot (0.3.5, 0.3.4)\r\nposix-spawn (0.3.10)\r\npry (0.10.1, 0.9.12.6)\r\npsych (2.0.0)\r\npublic_suffix (1.4.6)\r\npuma (1.6.3)\r\npygments.rb (0.6.2, 0.6.1)\r\nrack (1.6.4, 1.6.1, 1.5.2)\r\nrack-protection (1.5.3, 1.5.2)\r\nrack-test (0.6.3)\r\nrake (10.4.2, 10.3.2, 10.2.2, 0.9.6)\r\nrb-fsevent (0.9.4)\r\nrb-inotify (0.9.5)\r\nrdiscount (2.1.7)\r\nrdoc (4.0.0)\r\nredcarpet (3.2.3, 3.2.2, 3.1.2, 3.1.0)\r\nRedCloth (4.2.9)\r\nredis (3.1.0)\r\nrest-client (1.6.7)\r\nretryable (2.0.1)\r\nridley (4.2.0, 4.1.2)\r\nrspec (3.3.0, 3.2.0, 3.1.0, 2.99.0, 2.14.1)\r\nrspec-core (3.3.2, 3.3.1, 3.2.3, 3.2.1, 3.1.7, 2.99.0, 2.14.8)\r\nrspec-expectations (3.3.1, 3.3.0, 3.2.1, 3.2.0, 3.1.2, 2.99.0, 2.14.5)\r\nrspec-its (1.2.0, 1.1.0)\r\nrspec-mocks (3.3.2, 3.3.1, 3.2.1, 3.1.3, 2.99.0, 2.14.6)\r\nrspec-support (3.3.0, 3.2.2, 3.1.2)\r\nrspec_junit_formatter (0.2.3)\r\nruby-progressbar (1.5.1)\r\nruby_unicornsay (0.0.1)\r\nrufus-lru (1.0.5)\r\nsafe_yaml (1.0.4)\r\nsass (3.4.13, 3.4.11)\r\nsawyer (0.6.0)\r\nsemverse (1.2.1)\r\nserverspec (2.19.0, 2.14.1, 2.9.1, 2.6.0)\r\nsfl (2.2)\r\nshowoff (0.9.10.8, 0.9.7)\r\nsinatra (1.4.6, 1.4.4)\r\nsinatra-base (1.4.0)\r\nsinatra-contrib (1.4.2)\r\nsinatra-cross_origin (0.3.2)\r\nsinatra-websocket (0.3.1, 0.3.0)\r\nslop (3.6.0, 3.5.0)\r\nsolve (1.2.1)\r\nspecinfra (2.37.8, 2.37.5, 2.37.1, 2.36.15, 2.36.14, 2.36.12, 2.28.1, 2.17.1, 2.10.0)\r\nsyslog-logger (1.6.8)\r\nsystemu (2.6.5, 2.6.4, 2.5.2)\r\nterminal-table (1.5.2, 1.4.5)\r\ntest-kitchen (1.2.1)\r\ntest-unit (2.0.0.0)\r\nthin (1.6.3, 1.6.1)\r\nthor (0.19.1)\r\nthread_safe (0.3.5)\r\ntilt (2.0.1, 1.4.1)\r\ntimers (4.0.1)\r\ntoml (0.1.2)\r\ntreetop (1.6.3, 1.5.3, 1.4.15)\r\ntrollop (1.16.2)\r\ntzinfo (1.2.2)\r\nuuidtools (2.1.5)\r\nvagrant (1.5.0)\r\nvaria_model (0.4.0)\r\nwebmock (1.21.0)\r\nwebrick (1.3.1)\r\nwmi-lite (1.0.0)\r\nyajl-ruby (1.2.1, 1.1.0)\r\n```\r\n\r\nQuestion is: what am I doing wrong? Thx for any help on this issue!\r\n"},"comment":{"url":"https://api.github.com/repos/sethvargo/chefspec/issues/comments/125534589","html_url":"https://github.com/sethvargo/chefspec/issues/614#issuecomment-125534589","issue_url":"https://api.github.com/repos/sethvargo/chefspec/issues/614","id":125534589,"user":{"login":"michaellihs","id":575011,"avatar_url":"https://avatars.githubusercontent.com/u/575011?v=3","gravatar_id":"","url":"https://api.github.com/users/michaellihs","html_url":"https://github.com/michaellihs","followers_url":"https://api.github.com/users/michaellihs/followers","following_url":"https://api.github.com/users/michaellihs/following{/other_user}","gists_url":"https://api.github.com/users/michaellihs/gists{/gist_id}","starred_url":"https://api.github.com/users/michaellihs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaellihs/subscriptions","organizations_url":"https://api.github.com/users/michaellihs/orgs","repos_url":"https://api.github.com/users/michaellihs/repos","events_url":"https://api.github.com/users/michaellihs/events{/privacy}","received_events_url":"https://api.github.com/users/michaellihs/received_events","type":"User","site_admin":false},"created_at":"2015-07-28T09:58:14Z","updated_at":"2015-07-28T09:58:14Z","body":"Hey @sethvargo - just wanted to let you know that after fixing the specs following your advice with \r\n\r\n````ruby\r\n  let(:chef_run) { ChefSpec::SoloRunner.new(platform: 'ubuntu', version: '14.04').converge(described_recipe) }\r\n````\r\n\r\neverything works like a charm - thanks a lot!"}}