Contact Me
Rails Recipes
My Job Went to India

Tattle: The Ruby Census

January 8th, 2007

At the first Rails Edge conference, Jim Weirich, Bruce Williams, and I were chatting about how to improve the RubyGems platform-specific behavior, when we realized that it would be really helpful to have more info about the install footprint of the Ruby community at large.

So instead of going right into hacking RubyGems as was our plan, we created a little census tool and an accompanying web site to help us collect information. Most of the info we collect is from Config::CONFIG, with the addition of the RubyGems version.

We know this information will help the implementers of RubyGems, and we hope it will also help Ruby implementers and library developers as well.

To install:

$ sudo gem install tattle

To submit your info:

$ tattle

If you want to see what would be posted before posting, you can do:

$ tattle report

The information gets posted to http://tattle.rubygarden.org. You can view the posted data with your web browser at that URL.

As a side note, Eric posted the latest RubyGems beta this weekend. Please do give it a go if you’re so inclined.

11 Comments

  1. topfunky Says:

    Remember to run tattle from your servers that run Ruby since they use RubyGems, too.

  2. evan Says:

    It would be nice if the script queried the user so as to separate development systems from production environments in the reports view.

  3. hgs Says:

    Probably worth mentioning that the install will ask for Hoe and Rubyforge gems.

  4. masukomi Says:

    Mine recorded my shell as /bin/sh If you’re curious as to what shell Ruby would go to then that’s correct. If you’re curious as to what shell I’m using then it’s not.

  5. Chad Fowler Says:

    masukomi, in this case SHELL is the thing from rbconfig, which is the shell Ruby uses when it does system calls. That is indeed what we intended to capture.

  6. zsoltika Says:

    And what about those who are behind a proxy? (And has http_proxy set up properly…): tattle ~/Documents/Work/OPS-6_12-release Posting information to Tattle server. Thanks! /usr/lib/ruby/1.8/net/http.rb:560:in `initialize’: Connection refused – connect(2) (Errno::ECONNREFUSED) from /usr/lib/ruby/1.8/net/http.rb:560:in `open’ from /usr/lib/ruby/1.8/net/http.rb:560:in `connect’ from /usr/lib/ruby/1.8/timeout.rb:48:in `timeout’ from /usr/lib/ruby/1.8/timeout.rb:76:in `timeout’ from /usr/lib/ruby/1.8/net/http.rb:560:in `connect’ from /usr/lib/ruby/1.8/net/http.rb:553:in `do_start’ from /usr/lib/ruby/1.8/net/http.rb:542:in `start’ from /usr/lib/ruby/gems/1.8/gems/tattle-1.0.1/lib/tattle.rb:29:in `post’ from /usr/lib/ruby/gems/1.8/gems/tattle-1.0.1/bin/tattle:14 from /usr/bin/tattle:18:in `load’ from /usr/bin/tattle:18

  7. Per Says:

    A small note for the paranoid. Strictly speaking, tattle does send one piece of information that can in some cases be personal. It sends the prefix path fot the Ruby installation. If you have installed Ruby in a non-standard location (such as your home-dir on a shared host), your username is likely to appear in that path.

    You should consider not showing this prefix on public statistics page. Or consider removing it from the report. It can’t be that essential to know, I think.

  8. Chad Fowler Says:

    zsoltika: that’s on the TODO list.

    Per: Good point. We’ll consider removing it from the report.

  9. w00fy Says:

    Nice work :-)

  10. foo Says:

    If you’d accept a not thoroughly tested and probably lame patch, here it is:

    13a14,18 > if ENV["http_proxy"] > PROXY_HOST, PROXY_PORT = URI.parse(ENV["http_proxy"]) > else > PROXY_HOST = PROXY_PORT = nil > end 29c34 < Net::HTTP.new(REPORTING_URL.host, REPORTING_URL.port).start do |http| --- > Net::HTTP.new(REPORTING_URL.host, REPORTING_URL.port, PROXY_HOST, PROXY_PORT).start do |http|

    It works for me, though.

  11. foo Says:

    Yeah, that was lame. This one should be better.

    13a14,18
    >     if ENV["http_proxy"]
    >       PROXY_HOST, PROXY_PORT = URI.parse(ENV["http_proxy"]).host, URI.parse(ENV["http_proxy"]).port
    >     else
    >       PROXY_HOST = PROXY_PORT = nil
    >     end
    29c34
    <        Net::HTTP.new(REPORTING_URL.host, REPORTING_URL.port).start do |http|
    ---
    >        Net::HTTP.new(REPORTING_URL.host, REPORTING_URL.port, PROXY_HOST, PROXY_PORT).start do |http|
    

Sorry, comments are closed for this article.