CocoaPods / cocoadocs.org

Static generator for CocoaDocs.org
http://cocoadocs.org
MIT License
95 stars 15 forks source link

uninitialized constant AppledocTemplateGenerator::HashInit #543

Closed nikburnt closed 6 years ago

nikburnt commented 6 years ago

I've followed installation steps, but when I'm trying to make a docs I've got an error. Install logs and error log attached:

➜  temp git clone https://github.com/CocoaPods/cocoadocs.org.git
Cloning into 'cocoadocs.org'...
remote: Counting objects: 3682, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3682 (delta 0), reused 1 (delta 0), pack-reused 3679
Receiving objects: 100% (3682/3682), 4.14 MiB | 993.00 KiB/s, done.
Resolving deltas: 100% (2257/2257), done.
➜  temp cd cocoadocs.org
➜  cocoadocs.org git:(master) bundle install
Using rake 10.4.0
Using CFPropertyList 2.3.5
Using i18n 0.8.1
Using minitest 5.10.2
Using thread_safe 0.3.6
Using tzinfo 1.2.3
Using activesupport 4.2.8
Using addressable 2.3.8
Using ast 2.0.0
Using slop 3.6.0
Using parser 2.2.0.pre.5
Using astrolabe 1.3.0
Using backports 3.6.3
Using bacon 1.2.0
Using bundler 1.16.0.pre.2
Using claide 1.0.1
Using fuzzy_match 2.0.4
Using nap 1.1.0
Using cocoapods-core 1.1.1
Using cocoapods-deintegrate 1.0.1
Using cocoapods-downloader 1.1.3
Using cocoapods-plugins 1.0.0
Using cocoapods-search 1.0.0
Using cocoapods-stats 1.0.0
Using netrc 0.7.8
Using cocoapods-trunk 1.2.0
Using cocoapods-try 1.1.0
Using colored 1.2
Using escape 0.0.4
Using fourflusher 2.0.1
Using gh_inspector 1.0.3
Using molinillo 0.5.7
Using colored2 3.1.2
Using nanaimo 0.2.3
Using xcodeproj 1.4.4
Using cocoapods 1.1.1
Using coderay 1.1.0
Using sqlite3 1.3.13
Using docstat 1.0.4
Using dotenv-deployment 0.0.2
Using dotenv 0.11.1
Using ffi 1.9.6
Using ethon 0.7.1
Using multipart-post 2.0.0
Using faraday 0.9.2
Using faraday_middleware 0.9.1
Using thor 0.19.1
Using foreman 0.75.0
Using multi_json 1.10.1
Using net-http-persistent 2.9.4
Using net-http-pipeline 1.0.1
Using gh 0.13.2
Using highline 1.6.21
Using htmlcompressor 0.1.2
Using multi_xml 0.5.5
Using httparty 0.8.3
Using mustache 0.99.8
Using open4 1.3.4
Using redcarpet 3.4.0
Using rouge 1.11.1
Using sass 3.4.24
Using liferaft 0.0.6
Using xcinvoke 0.3.0
Using jazzy 0.8.2 from https://github.com/realm/Jazzy.git (at master@ca9e543)

Your user account isn't allowed to install to the system RubyGems.
  You can cancel this installation and run:

      bundle install --path vendor/bundle

  to install the gems into ./vendor/bundle/, or you can enter your password
  and install the bundled gems to RubyGems using sudo.

  Password:

Your user account isn't allowed to install to the system RubyGems.
  You can cancel this installation and run:

      bundle install --path vendor/bundle

  to install the gems into ./vendor/bundle/, or you can enter your password
  and install the bundled gems to RubyGems using sudo.

  Password:
Using json 1.8.6
Using launchy 2.4.2
Using metaclass 0.0.4
Using method_source 0.8.2
Using mime-types 1.25.1
Using mini_portile 0.6.2
Using mocha 1.1.0
Using mocha-on-bacon 0.2.2
Using net-ssh 2.9.2
Using net-ssh-shell 0.1.0
Using nokogiri 1.6.6.2
Using sawyer 0.8.1
Using octokit 4.7.0
Using powerpack 0.0.9
Using prettybacon 0.0.2
Using pry 0.9.12.6
Using websocket 1.2.1
Using pusher-client 0.6.0
Using rack 1.5.2
Using rack-protection 1.5.3
Using rainbow 2.0.0
Using rb-readline 0.5.1
Using rdoc 4.1.2
Using rest-client 1.6.8
Using unirest 1.1.2
Using readme-score 0.0.2
Using ruby-progressbar 1.6.0
Using rubocop 0.26.1
Using tilt 1.4.1
Using sinatra 1.3.1
Using temple 0.6.9
Using slim 1.3.9
Using typhoeus 0.6.9
Using travis 1.7.2
Bundle complete! 28 Gemfile dependencies, 98 gems now installed.
Use 'bundle info [gemname]' to see where a bundled gem is installed.
➜  cocoadocs.org git:(master) bundle exec rake install_tools
/Library/Ruby/Gems/2.3.0/gems/htmlcompressor-0.1.2/lib/htmlcompressor/compressor.rb:112: warning: key :javascript_compressor is duplicated and overwritten on line 132
/Library/Ruby/Gems/2.3.0/gems/htmlcompressor-0.1.2/lib/htmlcompressor/compressor.rb:113: warning: key :css_compressor is duplicated and overwritten on line 133
Warning: awscli 1.11.150 is already installed
➜  cocoadocs.org git:(master) bundle exec ./cocoadocs.rb preview ARAnalytics
bundler: failed to load command: ./cocoadocs.rb (./cocoadocs.rb)
NameError: uninitialized constant AppledocTemplateGenerator::HashInit
  /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.1.1/lib/cocoapods/sources_manager.rb:168:in 'const_missing'
  /Users/nikburnt/Development/temp/cocoadocs.org/classes/appledoc_template_generator.rb:2:in '<class:AppledocTemplateGenerator>'
  /Users/nikburnt/Development/temp/cocoadocs.org/classes/appledoc_template_generator.rb:1:in '<top (required)>'
  /Users/nikburnt/Development/temp/cocoadocs.org/cocoadocs.rb:90:in 'require_relative'
  /Users/nikburnt/Development/temp/cocoadocs.org/cocoadocs.rb:90:in 'block in <class:CocoaDocs>'
  /Users/nikburnt/Development/temp/cocoadocs.org/cocoadocs.rb:89:in 'each'
  /Users/nikburnt/Development/temp/cocoadocs.org/cocoadocs.rb:89:in '<class:CocoaDocs>'
  /Users/nikburnt/Development/temp/cocoadocs.org/cocoadocs.rb:28:in '<top (required)>'

Maybe I have miss some steps or tricks?

macOS Hight Sierra

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

flovilmart commented 6 years ago

Same issue here.

flovilmart commented 6 years ago

this patch seems to do the trick

diff --git a/classes/appledoc_template_generator.rb b/classes/appledoc_template_generator.rb
index 9f25f7e..8791c7b 100644
--- a/classes/appledoc_template_generator.rb
+++ b/classes/appledoc_template_generator.rb
@@ -1,3 +1,11 @@
+module HashInit
+  def initialize(*h)
+    if h.length == 1 && h.first.is_a?(Hash)
+      h.first.each { |k, v| send("#{k}=", v) }
+    end
+  end
+end
+
Palleas commented 6 years ago

@flovilmart could you please open a pull-request for this? ❤️

flovilmart commented 6 years ago

I could, but It doesn’t explain why _utils is not loaded :/

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.