Ticket #2 (closed defect: invalid)

Opened 8 months ago

Last modified 8 months ago

ruby tutorial is broken

Reported by: thaidn Owned by: somebody
Priority: major Milestone:
Component: component1 Version:
Keywords: Cc:

Description

Step to reproduce:

$ ruby -v
ruby 1.8.6 (2007-06-07 patchlevel 36) [i486-linux]

$ cd tutorial/rb

$ ruby BookmarkExample?.rb
BookmarkExample?.rb:45:in `connect_to_thrudex': uninitialized constant Thrudex::Client (NameError?)

from BookmarkExample?.rb:28:in `initialize'
from BookmarkExample?.rb:259:in `new'
from BookmarkExample?.rb:259

When I dive into the code, it seems that the auto-generated code of Thrudex is broken:

#
# Autogenerated by Thrift
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#

require 'thrift/protocol/tprotocol'
require 'thrift/thrift'
require 'Thrudex_types'

module Thrudex

module Thrudex

class Client

include ThriftClient?

You see? That's the extra "module Thrudex" line causes the problem.

Attachments

BookmarkExample.rb.patch (1.5 kB) - added by thai 8 months ago.

Change History

Changed 8 months ago by thai

  • status changed from new to closed
  • resolution set to invalid

This is a Thrift bug, see http://publists.facebook.com/pipermail/thrift/2008-February/000622.html. Jake said he'd get it fixed when he's on the thrift hackathon next week.

Changed 8 months ago by thai

I fix the Thrift bug but the Ruby tutorial is still broken. I attach a patch to solve it. Run these commands to apply:

$ cd tutorial/rb
$ patch < BookmarkExample.rb.patch

Changed 8 months ago by thai

Note: See TracTickets for help on using tickets.