Issue #4739 has been reported by Dennis Matotek.

----------------------------------------
Bug #4739: puppet-doc Rake install errors
http://projects.puppetlabs.com/issues/4739

Author: Dennis Matotek
Status: Unreviewed
Priority: Normal
Assignee: 
Category: documentation
Target version: 
Affected version: 
Keywords: 
Branch: 


Hi, 

Following the instructions in the README.markdown (and github 
http://github.com/reductivelabs/puppet-docs) I received the following errors.

On Fed11, ruby 1.8.6 
I had to install nokogiri as a gem before I could run rake install.


$ sudo rake install
gem install maruku --no-rdoc --no-ri
Successfully installed maruku-0.6.0
1 gem installed
gem install nokogiri --no-rdoc --no-ri
Building native extensions.  This could take a while...
Successfully installed nokogiri-1.4.3.1
1 gem installed
gem install erubis --no-rdoc --no-ri
Successfully installed erubis-2.6.6
1 gem installed
gem install rack --no-rdoc --no-ri
Successfully installed rack-1.2.1
1 gem installed
gem install blockenspiel --no-rdoc --no-ri
ERROR:  Error installing blockenspiel:
        blockenspiel requires Ruby version >= 1.8.7.
rake aborted!
Command failed with status (1): [gem install blockenspiel --no-rdoc --no-ri...]
/home/dennis/workspace/puppet-docs/Rakefile:23
(See full trace by running task with --trace)

I installed version 0.3.3 of blockenspiel as a gem and removed it from the 
Rakefile:

diff --git a/Rakefile b/Rakefile
index 117c936..74692a3 100644
--- a/Rakefile
+++ b/Rakefile
@@ -13,7 +13,7 @@ end
 
 $LOAD_PATH.unshift File.expand_path('lib')
 
-dependencies = %w(maruku nokogiri erubis rack blockenspiel versionomy)
+dependencies = %w(maruku nokogiri erubis rack versionomy)
 references = %w(configuration function indirection metaparameter network 
report type)
 
 namespace :install do

It then installed everything fine. I then had the following issue:

$ rake generate --trace
(in /home/dennis/workspace/puppet-docs)
** Invoke generate (first_time)
** Execute generate
bin/generate
./bin/../lib/puppet_docs/generator.rb:15:in `initialize': uninitialized 
constant PuppetDocs::Generator::FileUtils (NameError)
        from bin/generate:7:in `new'
        from bin/generate:7
rake aborted!
Command failed with status (1): [bin/generate...]
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:994:in `sh'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1009:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1009:in `sh'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1093:in `sh'
/home/dennis/workspace/puppet-docs/Rakefile:34
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:635:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:635:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:630:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:630:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in 
`invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:589:in 
`invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:582:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2050:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:in 
`standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2022:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:in 
`standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1997:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19

Doing the following fixed this:

diff --git a/lib/puppet_docs/generator.rb b/lib/puppet_docs/generator.rb
index 9dd4f35..900f5e0 100644
--- a/lib/puppet_docs/generator.rb
+++ b/lib/puppet_docs/generator.rb
@@ -2,6 +2,8 @@ module PuppetDocs
   class Generator
     attr_reader :output, :view_path, :view, :source_dir
 
+    require 'fileutils'
+
     class MissingPrologueError < ::ArgumentError; end
 
     def initialize(output = nil)

However it may not be your preferred solution. 

I made the following changes in the README.markdown to explain.

diff --git a/README.markdown b/README.markdown
index 5d169b3..68b4c68 100644
--- a/README.markdown
+++ b/README.markdown
@@ -13,7 +13,8 @@ Steps for installing the documentation-generating code:
     $ git clone git://github.com/reductivelabs/puppet-docs.git
 
 2.  Use your package manager to install rake, libxml2-dev, and
-    libxslt-dev.  Package names may vary by platform.
+    libxslt-dev.  Package names may vary by platform. If you are using version 
< 1.8.7 of ruby
+    you will need to install version 0.3.3 of blockenspiel and remove it from 
the Rakefile.
 
 3.  Install the ruby dependencies
 



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to