I am using puppet 2.7.14 on Ubuntu 10.04 LTS. I have the following gems: *** LOCAL GEMS *** diff-lcs (1.1.3) hiera (0.3.0) hiera-puppet (0.3.0) metaclass (0.0.1) mocha (0.12.1) puppet-lint (0.1.13) puppetlabs_spec_helper (0.2.0) rake (0.9.2.2) rspec (2.11.0) rspec-core (2.11.1) rspec-expectations (2.11.2) rspec-mocks (2.11.1) rspec-puppet (0.1.3) When I run "rake help" I get the following: $ sudo rake help --trace (in /etc/puppet/environments/test/modules/ruby) rake aborted! uninitialized constant Rake::DSL /usr/lib/ruby/1.8/rake.rb:2503:in `const_missing'' /var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/tasklib.rb:8 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'' /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'' /var/lib/gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/rake_task.rb:4 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'' /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'' /var/lib/gems/1.8/gems/puppetlabs_spec_helper-0.2.0/lib/puppetlabs_spec_helper/rake_tasks.rb:2 /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'' /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `require'' /etc/puppet/environments/test/modules/ruby/Rakefile:2 /usr/lib/ruby/1.8/rake.rb:2383:in `load'' /usr/lib/ruby/1.8/rake.rb:2383:in `raw_load_rakefile'' /usr/lib/ruby/1.8/rake.rb:2017:in `load_rakefile'' /usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'' /usr/lib/ruby/1.8/rake.rb:2016:in `load_rakefile'' /usr/lib/ruby/1.8/rake.rb:2000:in `run'' /usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'' /usr/lib/ruby/1.8/rake.rb:1998:in `run'' /usr/bin/rake:28 I suspect it is something simple, like missing gem, but can''t figure it out. Any ideas? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/XUL_3dTbJcgJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Justin Stoller
2012-Aug-17 15:58 UTC
Re: [Puppet Users] puppet-rspec / puppetlabs_spec_helper
On Fri, Aug 17, 2012 at 8:42 AM, llowder <llowderiv@gmail.com> wrote:> > I am using puppet 2.7.14 on Ubuntu 10.04 LTS. I have the following gems: > > *** LOCAL GEMS *** > > diff-lcs (1.1.3) > hiera (0.3.0) > hiera-puppet (0.3.0) > metaclass (0.0.1) > mocha (0.12.1) > puppet-lint (0.1.13) > puppetlabs_spec_helper (0.2.0) > rake (0.9.2.2) > rspec (2.11.0) > rspec-core (2.11.1) > rspec-expectations (2.11.2) > rspec-mocks (2.11.1) > rspec-puppet (0.1.3) > > When I run "rake help" I get the following: > > $ sudo rake help --trace > (in /etc/puppet/environments/test/modules/ruby) > rake aborted! > uninitialized constant Rake::DSL > /usr/lib/ruby/1.8/rake.rb:2503:in `const_missing'' > /var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/tasklib.rb:8 > /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'' > /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'' > /var/lib/gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/rake_task.rb:4 > /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'' > /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'' > /var/lib/gems/1.8/gems/puppetlabs_spec_helper-0.2.0/lib/puppetlabs_spec_helper/rake_tasks.rb:2 > /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'' > /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `require'' > /etc/puppet/environments/test/modules/ruby/Rakefile:2 > /usr/lib/ruby/1.8/rake.rb:2383:in `load'' > /usr/lib/ruby/1.8/rake.rb:2383:in `raw_load_rakefile'' > /usr/lib/ruby/1.8/rake.rb:2017:in `load_rakefile'' > /usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'' > /usr/lib/ruby/1.8/rake.rb:2016:in `load_rakefile'' > /usr/lib/ruby/1.8/rake.rb:2000:in `run'' > /usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'' > /usr/lib/ruby/1.8/rake.rb:1998:in `run'' > /usr/bin/rake:28 > > I suspect it is something simple, like missing gem, but can''t figure it out.This is RSpec using an old way of initializing Rake. see: http://stackoverflow.com/questions/6085610/ruby-on-rails-and-rake-problems-uninitialized-constant-rakedsl for more discussion and possible solutions. Lemme know if that doesn''t work for you. HTH, Justin> > Any ideas? > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/puppet-users/-/XUL_3dTbJcgJ. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Friday, August 17, 2012 10:58:40 AM UTC-5, Justin Stoller wrote:> > > This is RSpec using an old way of initializing Rake. > see: > http://stackoverflow.com/questions/6085610/ruby-on-rails-and-rake-problems-uninitialized-constant-rakedsl > for more discussion and possible solutions. > > Lemme know if that doesn''t work for you. > >I had seen that prior to posting. I have another test VM (which is where I copied the gems from) where it is working. It has a lot more gems installed due to some testing I did with foreman on that box. So I know that the version of the gems isn''t the problem. The other main difference between the two boxes is the puppet and ubuntu versions (the problem box is running 10.04 + 2.7.14, while the test Vm where it works is 12.04 + 2.7.17) The Rakefile is the same on both boxes, and it is all done as per: http://puppetlabs.com/blog/the-next-generation-of-puppet-module-testing/> HTH, > Justin > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/HUyDseEekN0J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Got this fixed, seems the new box had an old version of rake installed and when I did gem install rake, it did not update the system bin. On Friday, August 17, 2012 11:16:28 AM UTC-5, llowder wrote:> > > > On Friday, August 17, 2012 10:58:40 AM UTC-5, Justin Stoller wrote: >> >> >> This is RSpec using an old way of initializing Rake. >> see: >> http://stackoverflow.com/questions/6085610/ruby-on-rails-and-rake-problems-uninitialized-constant-rakedsl >> for more discussion and possible solutions. >> >> Lemme know if that doesn''t work for you. >> >> > I had seen that prior to posting. I have another test VM (which is where > I copied the gems from) where it is working. It has a lot more gems > installed due to some testing I did with foreman on that box. So I know > that the version of the gems isn''t the problem. > > The other main difference between the two boxes is the puppet and ubuntu > versions (the problem box is running 10.04 + 2.7.14, while the test Vm > where it works is 12.04 + 2.7.17) > > The Rakefile is the same on both boxes, and it is all done as per: > http://puppetlabs.com/blog/the-next-generation-of-puppet-module-testing/ > > > > >> HTH, >> Justin >> >>-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/NZWcfy4ZaHcJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.