cboettig / labnotebook

:notebook: Source code and version history for my online lab notebook
http://www.carlboettiger.info
Creative Commons Zero v1.0 Universal
98 stars 61 forks source link

garb auth error when compiling #102

Closed antass closed 10 years ago

antass commented 11 years ago

Thanks so much for making your labnotebook open source!

I have recently moved from an Ubuntu installation to a Mac, and I am experiencing problems with compiling the labnotebook at the Google Analytics plugin stage. I have double-checked the credentials, reissued API key, etc.. This is what I get:

jekyll build --trace
Configuration file: /Users/antass/GitHub/labnotebook/_config.yml
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.8
            Source: /Users/antass/GitHub/labnotebook
       Destination: /Users/antass/GitHub/labnotebook/_site
      Generating... cred doneapi done/Users/antass/.rvm/gems/ruby-1.9.3-p429/gems/garb-0.9.7/lib/garb/request/authentication.rb:38:in `block in send_request': Garb::AuthError (Garb::AuthError)
        from /Users/antass/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:1323:in `block (2 levels) in transport_request'
        from /Users/antass/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:2672:in `reading_body'
        from /Users/antass/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:1322:in `block in transport_request'
        from /Users/antass/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:1317:in `catch'
        from /Users/antass/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:1317:in `transport_request'
        from /Users/antass/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:1294:in `request'
        from /Users/antass/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:1287:in `block in request'
        from /Users/antass/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:746:in `start'
        from /Users/antass/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:1285:in `request'
        from /Users/antass/.rvm/gems/ruby-1.9.3-p429/gems/garb-0.9.7/lib/garb/request/authentication.rb:37:in `send_request'
        from /Users/antass/.rvm/gems/ruby-1.9.3-p429/gems/garb-0.9.7/lib/garb/request/authentication.rb:50:in `auth_token'
        from /Users/antass/.rvm/gems/ruby-1.9.3-p429/gems/garb-0.9.7/lib/garb/session.rb:10:in `login'
        from /Users/antass/GitHub/labnotebook/_plugins/jekyll-labnotebook-plugins/google_analytics.rb:91:in `generate'
        from /Users/antass/.rvm/gems/ruby-1.9.3-p429/gems/jekyll-1.0.3/lib/jekyll/site.rb:218:in `block in generate'
        from /Users/antass/.rvm/gems/ruby-1.9.3-p429/gems/jekyll-1.0.3/lib/jekyll/site.rb:217:in `each'
        from /Users/antass/.rvm/gems/ruby-1.9.3-p429/gems/jekyll-1.0.3/lib/jekyll/site.rb:217:in `generate'
        from /Users/antass/.rvm/gems/ruby-1.9.3-p429/gems/jekyll-1.0.3/lib/jekyll/site.rb:43:in `process'
        from /Users/antass/.rvm/gems/ruby-1.9.3-p429/gems/jekyll-1.0.3/lib/jekyll/command.rb:18:in `process_site'
        from /Users/antass/.rvm/gems/ruby-1.9.3-p429/gems/jekyll-1.0.3/lib/jekyll/commands/build.rb:23:in `build'
        from /Users/antass/.rvm/gems/ruby-1.9.3-p429/gems/jekyll-1.0.3/lib/jekyll/commands/build.rb:7:in `process'
        from /Users/antass/.rvm/gems/ruby-1.9.3-p429/gems/jekyll-1.0.3/bin/jekyll:61:in `block (2 levels) in <top (required)>'
        from /Users/antass/.rvm/gems/ruby-1.9.3-p429/gems/commander-4.1.3/lib/commander/command.rb:180:in `call'
        from /Users/antass/.rvm/gems/ruby-1.9.3-p429/gems/commander-4.1.3/lib/commander/command.rb:180:in `call'
        from /Users/antass/.rvm/gems/ruby-1.9.3-p429/gems/commander-4.1.3/lib/commander/command.rb:155:in `run'
        from /Users/antass/.rvm/gems/ruby-1.9.3-p429/gems/commander-4.1.3/lib/commander/runner.rb:402:in `run_active_command'
        from /Users/antass/.rvm/gems/ruby-1.9.3-p429/gems/commander-4.1.3/lib/commander/runner.rb:78:in `run!'
        from /Users/antass/.rvm/gems/ruby-1.9.3-p429/gems/commander-4.1.3/lib/commander/delegates.rb:11:in `run!'
        from /Users/antass/.rvm/gems/ruby-1.9.3-p429/gems/commander-4.1.3/lib/commander/import.rb:10:in `block in <top (required)>'

Here's the list of installed gems:

actionmailer (3.2.13)
actionpack (3.2.13)
activemodel (3.2.13)
activerecord (3.2.13)
activeresource (3.2.13)
activesupport (3.2.13, 3.1.12)
addressable (2.3.4)
arel (3.0.2)
atomic (1.1.10)
backports (3.3.2)
bigdecimal (1.1.0)
builder (3.2.2, 3.0.4)
bundler (1.3.5)
bundler-unload (1.0.1)
chronic (0.9.1)
classifier (1.3.3)
colorator (0.1)
commander (4.1.3)
crack (0.3.2)
curb (0.7.18)
directory_watcher (1.4.1)
erubis (2.7.0)
faraday (0.8.7)
faraday_middleware (0.9.0)
fast-stemmer (1.0.2)
feedzirra (0.1.3)
garb (0.9.7, 0.9.1)
hashie (2.0.5)
highline (1.6.19)
hike (1.2.3)
i18n (0.6.4, 0.6.1)
io-console (0.3)
jekyll (1.0.3)
jekyll-tagging (0.5.0)
journey (1.0.4)
json (1.8.0, 1.5.5)
kramdown (1.0.2)
liquid (2.5.0)
loofah (1.2.1)
mail (2.5.4)
maruku (0.6.1)
mime-types (1.23)
mini_portile (0.5.0)
minitest (4.7.5, 2.5.1)
multi_json (1.7.7)
multipart-post (1.2.0)
netrc (0.7.7)
nokogiri (1.6.0)
octokit (1.24.0)
pandoc-ruby (0.7.0)
polyglot (0.3.3)
posix-spawn (0.3.6)
pygments.rb (0.5.0)
rack (1.4.5)
rack-cache (1.2)
rack-ssl (1.3.3)
rack-test (0.6.2)
rails (3.2.13)
railties (3.2.13)
rake (10.1.0, 10.0.4, 0.9.2.2)
rdoc (3.9.5)
redcarpet (2.3.0)
ruby-nuggets (0.9.5)
rubygems-bundler (1.2.0)
rubygems-update (2.0.3)
rvm (1.11.3.8)
safe_yaml (0.7.0)
sax-machine (0.1.0)
simple_oauth (0.2.0)
specific_install (0.2.3)
sprockets (2.2.2)
syntax (1.0.0)
thor (0.18.1)
thread_safe (0.1.0)
tilt (1.4.1)
treetop (1.4.14)
twitter (4.8.1)
tzinfo (0.3.37)
yajl-ruby (1.1.0)

Is there a way to avoid loading the Google Analytics plugin when compiling the notebook? I don't have a use for it anyway.

cboettig commented 11 years ago

There should be a better way to toggle off the plugin, but for now you have to manually remove the line <p style="font-style:italic"> pageviews: {% pageviews %}{{post.url}}{% endpageviews %} </p> that appears in _includes/postexcerpt.html and _includes/sidebar.html

cboettig commented 11 years ago

Slight tweak from above, note that pageviews is now added simply by {{ post.pageviews }} so that's the line you'll want to remove in both those files. Will see about adding a toggle.

antass commented 11 years ago

I fetched all recent changes, deleted the lines you suggested, as well as flipped the toggle for pageviews in _config.yaml to no, but Google Analytics is still being loaded and fails:

jekyll build
Configuration from /Users/antass/GitHub/labnotebook/_config.yml
loaded config
Building site: /Users/antass/GitHub/labnotebook -> build
Generating page path metadata with base_name.rb
Storing raw md versions as post metadata with raw_content.rb
Getting Google Analytics data
/Users/antass/.rvm/gems/ruby-2.0.0-p195/gems/garb-0.9.7/lib/garb/model.rb:98:in `build_default_params': undefined method `id' for nil:NilClass (NoMethodError)
        from /Users/antass/.rvm/gems/ruby-2.0.0-p195/gems/garb-0.9.7/lib/garb/model.rb:34:in `results'
        from /Users/antass/GitHub/labnotebook/_plugins/jekyll-labnotebook-plugins/google_analytics.rb:74:in `generate'
        from /Users/antass/.rvm/gems/ruby-2.0.0-p195/gems/jekyll-0.12.1/lib/jekyll/site.rb:190:in `block in generate'
        from /Users/antass/.rvm/gems/ruby-2.0.0-p195/gems/jekyll-0.12.1/lib/jekyll/site.rb:189:in `each'
        from /Users/antass/.rvm/gems/ruby-2.0.0-p195/gems/jekyll-0.12.1/lib/jekyll/site.rb:189:in `generate'
        from /Users/antass/.rvm/gems/ruby-2.0.0-p195/gems/jekyll-0.12.1/lib/jekyll/site.rb:40:in `process'
        from /Users/antass/.rvm/gems/ruby-2.0.0-p195/gems/jekyll-0.12.1/bin/jekyll:264:in `<top (required)>'
        from /Users/antass/.rvm/gems/ruby-2.0.0-p195/bin/jekyll:23:in `load'
        from /Users/antass/.rvm/gems/ruby-2.0.0-p195/bin/jekyll:23:in `<main>'
        from /Users/antass/.rvm/gems/ruby-2.0.0-p195/bin/ruby_noexec_wrapper:14:in `eval'
        from /Users/antass/.rvm/gems/ruby-2.0.0-p195/bin/ruby_noexec_wrapper:14:in `<main>'
cboettig commented 10 years ago

it appears you haven't deleted the plugin that is causing the trouble. You see it being called in your return log:

    from /Users/antass/GitHub/labnotebook/_plugins/jekyll-labnotebook-plugins/google_analytics.rb:74:in `generate'

Try removing the google_analytics.rb plugin directly.