[MacRuby] #1462: gem "Twitter4R" require fails
#1462: gem "Twitter4R" require fails ---------------------------------+------------------------------------------ Reporter: cumomican@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: MacRuby Later Component: MacRuby | Keywords: twitter4r ---------------------------------+------------------------------------------ {{{ $ macruby -v MacRuby 0.12 (ruby 1.9.2) [universal-darwin10.0, x86_64] $ macirb irb(main):001:0> require 'rubygems' => true irb(main):002:0> gem 'twitter4r' => true irb(main):003:0> require 'twitter' TypeError: JSON::Ext::Generator::GeneratorMethods::Object:Class is not a module /Library/Frameworks/MacRuby.framework/Versions/0.12/usr/lib/ruby/Gems/1.9.2/gems/json-1.6.5/lib/json/ext.rb:14:in `block' /Library/Frameworks/MacRuby.framework/Versions/0.12/usr/lib/ruby/Gems/1.9.2/gems/json-1.6.5/lib/json/ext.rb:12:in `block' /Library/Frameworks/MacRuby.framework/Versions/0.12/usr/lib/ruby/Gems/1.9.2/gems/json-1.6.5/lib/json/ext.rb:9:in `<main>' /Library/Frameworks/MacRuby.framework/Versions/0.12/usr/lib/ruby/Gems/1.9.2/gems/json-1.6.5/lib/json.rb:58:in `block' /Library/Frameworks/MacRuby.framework/Versions/0.12/usr/lib/ruby/Gems/1.9.2/gems/json-1.6.5/lib/json.rb:54:in `<main>' /Library/Frameworks/MacRuby.framework/Versions/0.12/usr/lib/ruby/Gems/1.9.2/gems/twitter4r-0.7.0/lib/twitter.rb:23:in `<main>' irb(main):004:0> require 'twitter' Segmentation fault: 11 $ }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1462> MacRuby <http://macruby.org/>
#1462: gem "Twitter4R" require fails ---------------------------------+------------------------------------------ Reporter: cumomican@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: MacRuby Later Component: MacRuby | Keywords: twitter4r ---------------------------------+------------------------------------------ Comment(by mrada@…): This is a duplicate of another issue that I can't track down right now. The main problem here is that the twitter gem is very explicitly relying on the json gem and there is an incompatibility with the json gem and MacRuby (which is documented in the ticket that I cannot find). Internal to MacRuby we have worked around the issue, so if you load json first it should load the version that comes with MacRuby, and then twitter will hopefully use it and not have any issues. Though this is just a work around. Another solution would be for the twitter gem to use multi_json as an abstraction instead of json. -- Ticket URL: <http://www.macruby.org/trac/ticket/1462#comment:1> MacRuby <http://macruby.org/>
#1462: gem "Twitter4R" require fails ---------------------------------+------------------------------------------ Reporter: cumomican@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: MacRuby Later Component: MacRuby | Keywords: twitter4r ---------------------------------+------------------------------------------ Comment(by cumomican@…): Replying to [comment:1 mrada@…]: Thank you for your reply. I tried the way, but segfault occurs. step.1 remove "require 'json'" in twitter.rb step.2 macgem uninstall json step.3 {{{ $ macirb irb(main):001:0> require 'json' => true irb(main):002:0> p JSON::VERSION "1.5.1" => "1.5.1" irb(main):003:0> require 'twitter' Segmentation fault: 11 $ }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1462#comment:2> MacRuby <http://macruby.org/>
#1462: gem "Twitter4R" require fails ---------------------------------+------------------------------------------ Reporter: cumomican@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: MacRuby Later Component: MacRuby | Keywords: twitter4r ---------------------------------+------------------------------------------ Comment(by watson1978@…): This issue depends on #1326 -- Ticket URL: <http://www.macruby.org/trac/ticket/1462#comment:3> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby