Skip to content
This repository has been archived by the owner on Sep 5, 2018. It is now read-only.

Error after recent upgrade to 2.1.1 #36

Open
pca2 opened this issue May 21, 2013 · 5 comments
Open

Error after recent upgrade to 2.1.1 #36

pca2 opened this issue May 21, 2013 · 5 comments

Comments

@pca2
Copy link

pca2 commented May 21, 2013

After upgrading I get the following whenever I do anything other than authorize:

/home/carleton/.rvm/gems/ruby-1.9.3-p392/gems/weary-1.1.3/lib/weary/response.rb:59:in `parse': cannot load such file -- multi_json (LoadError)
    from /home/carleton/.rvm/gems/ruby-1.9.3-p392/gems/promise-0.3.0/lib/promise.rb:89:in `method_missing'
    from /home/carleton/.rvm/gems/ruby-1.9.3-p392/gems/tumblr-rb-2.1.1/lib/tumblr/command_line_interface.rb:78:in `post'
    from /home/carleton/.rvm/gems/ruby-1.9.3-p392/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
    from /home/carleton/.rvm/gems/ruby-1.9.3-p392/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /home/carleton/.rvm/gems/ruby-1.9.3-p392/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /home/carleton/.rvm/gems/ruby-1.9.3-p392/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from /home/carleton/.rvm/gems/ruby-1.9.3-p392/gems/tumblr-rb-2.1.1/bin/tumblr:5:in `<top (required)>'
    from /home/carleton/.rvm/gems/ruby-1.9.3-p392/bin/tumblr:19:in `load'
    from /home/carleton/.rvm/gems/ruby-1.9.3-p392/bin/tumblr:19:in `<main>'
    from /home/carleton/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval'
    from /home/carleton/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `<main>'
@mwunsch
Copy link
Owner

mwunsch commented May 21, 2013

Can you run gem list within this context and post the output here? Specifically, I'm looking for the multi_json gem

@pca2
Copy link
Author

pca2 commented May 21, 2013

Update: the 'tumblr post' command works, but still spits out the error.

Here's my gem list. I installed multi_json after initially getting the error, but it didn't change anything. I'm using Ubuntu 12.04 if it's at all relevant.

actionmailer (3.2.13, 3.2.12)
actionpack (4.0.0.rc1, 3.2.13, 3.2.12)
activemodel (3.2.13, 3.2.12)
activerecord (3.2.13, 3.2.12)
activeresource (3.2.13, 3.2.12)
activesupport (4.0.0.rc1, 3.2.13, 3.2.12)
addressable (2.3.4, 2.3.3)
arel (4.0.0, 3.0.2)
atomic (1.1.9)
bcrypt-ruby (3.0.1)
bootstrap-sass (2.3.1.0, 2.2.2.0)
builder (3.2.0, 3.1.4, 3.0.4)
bundler (1.3.5, 1.3.4, 1.3.3, 1.3.2)
climate_control (0.0.3)
cocaine (0.5.1)
coffee-rails (4.0.0, 3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.6.2, 1.6.1)
devise (2.2.4, 2.2.3)
domain_name (0.5.11)
erubis (2.7.0)
excon (0.22.1, 0.21.0, 0.20.1, 0.16.10)
execjs (1.4.0)
heroku-api (0.3.10, 0.3.8)
hike (1.2.2, 1.2.1)
i18n (0.6.4, 0.6.1)
journey (1.0.4)
jquery-rails (2.2.1)
json (1.8.0, 1.7.7)
launchy (2.3.0, 2.2.0, 2.1.2)
mail (2.5.4, 2.5.3, 2.4.4)
mechanize (2.6.0)
mime-types (1.23, 1.21)
minitest (4.7.4)
multi_json (1.7.3, 1.7.2, 1.6.1, 1.3.7)
net-http-digest_auth (1.3)
net-http-persistent (2.8)
netrc (0.7.7)
nokogiri (1.5.9)
ntlm-http (0.1.1)
orm_adapter (0.4.0)
paperclip (3.4.2, 3.4.1)
polyglot (0.3.3)
promise (0.3.0)
rack (1.5.2, 1.4.5)
rack-cache (1.2)
rack-protection (1.5.0)
rack-ssl (1.3.3)
rack-test (0.6.2)
rails (3.2.13, 3.2.12)
railties (4.0.0.rc1, 3.2.13, 3.2.12)
rake (10.0.4, 10.0.3)
rdoc (4.0.1, 4.0.0, 3.12.2)
redis (3.0.4, 3.0.3)
rest-client (1.6.7)
rubygems-bundler (1.1.1)
rubyzip (0.9.9)
rvm (1.11.3.7, 1.11.3.6)
sass (3.2.9, 3.2.7)
sass-rails (3.2.6)
simple_form (2.1.0)
simple_oauth (0.2.0, 0.1.9)
sinatra (1.4.2, 1.3.5)
sprockets (2.9.3, 2.9.0, 2.2.2)
sqlite3 (1.3.7)
thor (0.18.1, 0.17.0, 0.16.0)
thread_safe (0.1.0)
tilt (1.4.1, 1.3.6, 1.3.5)
treetop (1.4.12)
tumblr-rb (2.1.1, 2.0.0)
tzinfo (0.3.37)
uglifier (2.1.1, 1.3.0)
unf (0.1.1)
unf_ext (0.0.6)
warden (1.2.1)
weary (1.1.3, 1.1.2)
webrobots (0.1.1)

Thanks!

@mwunsch
Copy link
Owner

mwunsch commented May 21, 2013

OK -- well let's do something kind of crazy. "multi_json" is loaded through autoload when needed from the Weary rest framework.

So let's force it's require early, open up and make a modification to this file: /home/carleton/.rvm/gems/ruby-1.9.3-p392/gems/tumblr-rb-2.1.1/lib/tumblr/command_line_interface.rb

Just after the other require statements at the top of the file add require 'multi_json' -- I'm curious if explicitly requiring it will fix this issue. My hunch is that because response is a future, the autoload might not be thread safe. Or something.

@pca2
Copy link
Author

pca2 commented May 22, 2013

Hooray, it's working now. However I am given this warning with each command:

You are using an old or stdlib version of json gem
Please upgrade to the recent version by adding this to your Gemfile:

  gem 'json', '~> 1.7.7'

Thanks for the help

@mwunsch
Copy link
Owner

mwunsch commented May 22, 2013

OK, glad that works. I'm going to update the CLI with that now, and will update Weary with a fix for the autoload issue.

That warning you get is b/c Ruby has too many json implementations for its own good. Weary uses multi_json to deal with all that craziness. By doing a gem install json or or gem install yajl it should remove this, as multi_json will just find the best json parser available.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants