[#340543] 64-bit Ruby for OS X ? — Greg Willits <lists@...>

Has anyone built a 64-bit Ruby for Leopard. I've googled my brains out,

15 messages 2009/07/01
[#340599] Re: 64-bit Ruby for OS X ? — Eric Hodel <drbrain@...7.net> 2009/07/01

On Jun 30, 2009, at 18:36, Greg Willits wrote:

[#340699] file.seek and unused bytes — Greg Willits <lists@...>

Ruby 1.8.6

40 messages 2009/07/03
[#340763] Re: file.seek and unused bytes — Gary Wright <gwtmp01@...> 2009/07/05

[#340764] Re: file.seek and unused bytes — Greg Willits <lists@...> 2009/07/05

Gary Wright wrote:

[#340766] Re: file.seek and unused bytes — Brian Candler <b.candler@...> 2009/07/05

Greg Willits wrote:

[#340767] Re: file.seek and unused bytes — Greg Willits <lists@...> 2009/07/05

Brian Candler wrote:

[#340769] Re: file.seek and unused bytes — Brian Candler <b.candler@...> 2009/07/05

Greg Willits wrote:

[#340771] Re: file.seek and unused bytes — Greg Willits <lists@...> 2009/07/05

Brian Candler wrote:

[#340787] Re: file.seek and unused bytes — Robert Klemme <shortcutter@...> 2009/07/06

On 06.07.2009 00:13, Greg Willits wrote:

[#340792] Re: file.seek and unused bytes — Greg Willits <lists@...> 2009/07/06

Robert Klemme wrote:

[#340794] Re: file.seek and unused bytes — Brian Candler <b.candler@...> 2009/07/06

Greg Willits wrote:

[#340803] Re: file.seek and unused bytes — Greg Willits <lists@...> 2009/07/06

Eeek. Opened a can of worms!

[#340743] to_proc and Proc/block conversion with & — Russ McBride <russ@...>

16 messages 2009/07/05

[#340827] Help with rdoc - generate documentation for Ruby 1.9.1 Standard Library? — Bjoern <bjoerngt@...>

Hi,

15 messages 2009/07/06

[#340868] Ruby 1.8 - character encoding — Thomas Thomassen <thomas@...>

I write Ruby plugins for Google Sketchup.

23 messages 2009/07/07
[#340878] Re: Ruby 1.8 - character encoding — Gregory Brown <gregory.t.brown@...> 2009/07/07

On Tue, Jul 7, 2009 at 8:28 AM, Thomas Thomassen<thomas@thomthom.net> wrote=

[#341133] which project should I work on? — Roger Pack <rogerpack2005@...>

I was wondering on any feedback on which of the following pet projects

37 messages 2009/07/10

[#341174] Math cube root — Zangief Ief <z4n9ief@...>

Hi,

22 messages 2009/07/11

[#341177] one line sorting

Hi.

22 messages 2009/07/11

[#341178] Ruby Versions site; shell access to historical and current Rubies — "David A. Black" <dblack@...>

Hi all --

17 messages 2009/07/11
[#341188] Re: [ANN] Ruby Versions site; shell access to historical and current Rubies — Caleb Clausen <vikkous@...> 2009/07/11

On 7/11/09, David A. Black <dblack@rubypal.com> wrote:

[#341191] Re: [ANN] Ruby Versions site; shell access to historical and current Rubies — James Gray <james@...> 2009/07/11

On Jul 11, 2009, at 11:10 AM, Caleb Clausen wrote:

[#341200] Re: [ANN] Ruby Versions site; shell access to historical and current Rubies — Caleb Clausen <vikkous@...> 2009/07/11

On 7/11/09, James Gray <james@grayproductions.net> wrote:

[#341203] Re: [ANN] Ruby Versions site; shell access to historical and current Rubies — James Gray <james@...> 2009/07/11

On Jul 11, 2009, at 2:18 PM, Caleb Clausen wrote:

[#341376] a regex that does not contain comma — Sijo Kg <sijo@...>

Hi

21 messages 2009/07/14

[#341379] Twelve rules of Ruby — Panu Kinnari <panu.kinnari@...>

Scott Adams of Dilbert fame talked about learning twelve concepts of

32 messages 2009/07/14
[#341408] Re: Twelve rules of Ruby — "David A. Black" <dblack@...> 2009/07/14

Hi --

[#341412] Re: Twelve rules of Ruby — "David A. Black" <dblack@...> 2009/07/14

Not sure why they wrapped weirdly (at least on my screen), but here's

[#341423] Re: Twelve rules of Ruby — Garry Freemyer <garryfre@...> 2009/07/14

I would think that the twelve rules should be in the form of what things are, not what they are not.

[#341424] Re: Twelve rules of Ruby — "David A. Black" <dblack@...> 2009/07/14

Hi --

[#341427] Re: Twelve rules of Ruby — Marc Heiler <shevegen@...> 2009/07/14

> Objects don't "have" methods

[#341384] can't install ruby-prof 0.7.0 or superior on windows — "DG" <nospam@...>

I found windows users of 0.7.3 here but I still can't instal

10 messages 2009/07/14

[#341553] bluecloth 2.0.5 — ged@...

23 messages 2009/07/16

[#341620] regexp exclusion search - find matches NOT ending with a string? — BrendanC <brencam@...>

I have the following text in a file:

10 messages 2009/07/17

[#341692] removing array duplicates where a subset is unique — Chuck Remes <cremes.devlist@...>

I need to remove duplicates from an array of arrays. I can't use

24 messages 2009/07/17
[#341694] Re: [Q] removing array duplicates where a subset is unique — "David A. Black" <dblack@...> 2009/07/17

Hi --

[#341697] Re: [Q] removing array duplicates where a subset is unique — Chuck Remes <cremes.devlist@...> 2009/07/17

[#341699] Re: [Q] removing array duplicates where a subset is unique — "David A. Black" <dblack@...> 2009/07/18

Hi --

[#341709] Re: [Q] removing array duplicates where a subset is unique — Chuck Remes <cremes.devlist@...> 2009/07/18

[#341784] Re: removing array duplicates where a subset is unique — 7stud -- <bbxx789_05ss@...> 2009/07/19

Chuck Remes wrote:

[#341722] Problems with gems and Ruby 1.8.7 — Henrique Testa <hgtesta@...>

Hi all,

20 messages 2009/07/18

[#341814] Do you program in any other language except for ruby? — Milan Dobrota <elitecoding@...>

And what are they? :)

28 messages 2009/07/20

[#341837] ruby IDE's — Sunil Kumar <sunil.muki@...>

Hi This is sunil..

60 messages 2009/07/20
[#341839] Re: ruby IDE's — Tom Cloyd <tomcloyd@...> 2009/07/20

Sunil Kumar wrote:

[#341841] Re: ruby IDE's — Wesley Chen <cjq.999@...> 2009/07/20

I don't agree the guy Tom.

[#341901] Re: ruby IDE's — marc <gmane@...> 2009/07/20

James Britt wrote:

[#341918] Re: ruby IDE's — Tom Cloyd <tomcloyd@...> 2009/07/20

marc wrote:

[#342011] Re: ruby IDE's — Robert Dober <robert.dober@...> 2009/07/21

On 7/20/09, Tom Cloyd <tomcloyd@comcast.net> wrote:

[#342017] Re: ruby IDE's — Garry Freemyer <garryfre@...> 2009/07/21

I have Netbeans 6.7 on the Mac Os X platform and its quite an ordeal to get it to install gems without putting it in the wrong directory because it executes installation that requires installation using sudo and does not prompt for the password, so stuff gets installed in the wrong directory.

[#342097] Re: ruby IDE's — Hassan Schroeder <hassan.schroeder@...> 2009/07/22

On Tue, Jul 21, 2009 at 9:09 AM, Garry Freemyer<garryfre@pacbell.net> wrote:

[#342109] Re: ruby IDE's — Garry Freemyer <garryfre@...> 2009/07/22

Well, take the last two lines J2SE 5.0 J2SE 1.4.2

[#342114] Re: ruby IDE's — Hassan Schroeder <hassan.schroeder@...> 2009/07/22

On Tue, Jul 21, 2009 at 7:35 PM, Garry Freemyer<garryfre@pacbell.net> wrote:

[#342116] Re: ruby IDE's — Garry Freemyer <garryfre@...> 2009/07/22

I am surprised to see sarcasm in this mailing list, or maybe I am just disappointed.

[#342117] Re: ruby IDE's — Hassan Schroeder <hassan.schroeder@...> 2009/07/22

On Tue, Jul 21, 2009 at 8:32 PM, Garry Freemyer<garryfre@pacbell.net> wrote:

[#342118] Re: ruby IDE's — Garry Freemyer <garryfre@...> 2009/07/22

I know what ruby is. I don't know what programs are included in the nebulous mass of programs that come under J2SE heading.

[#342119] Re: ruby IDE's — Hassan Schroeder <hassan.schroeder@...> 2009/07/22

On Tue, Jul 21, 2009 at 8:50 PM, Garry Freemyer<garryfre@pacbell.net> wrote:

[#341906] including newlines in a .sub — Alan Munn <amunn@...>

Hi, I'm new to ruby, and am having trouble with the following (\n is

12 messages 2009/07/20

[#341950] Byte窶都tream parsing in Ruby — Elliott Cable <me@...>

So, I’ve a problem. I’m using ncurses (or possibly not, might just

14 messages 2009/07/21
[#341979] Re: Byte窶都tream parsing in Ruby — Brian Candler <b.candler@...> 2009/07/21

Elliott Cable wrote:

[#342062] Re: Byte窶都tream parsing in Ruby — Elliott Cable <me@...> 2009/07/21

Brian Candler wrote:

[#341968] Mean method — "Älphä Blüë" <jdezenzio@...>

I'm working on a lot of math in my projects so I thought I would convert

19 messages 2009/07/21

[#341969] Ruby/Oracle connectivity — Dheeraj Gambhir <checktestingthings@...>

Hi All,

19 messages 2009/07/21

[#342013] String spliting and inclusion — Stuart Clarke <stuart.clarke1986@...>

Hi all,

17 messages 2009/07/21

[#342113] Best gem to parse Ruby with? — Tony Arcieri <tony@...>

I've been considering rewriting my require_all gem:

14 messages 2009/07/22
[#342115] Re: Best gem to parse Ruby with? — Caleb Clausen <vikkous@...> 2009/07/22

On 7/21/09, Tony Arcieri <tony@medioh.com> wrote:

[#342185] Instantiating classes / sharing data between classes — Trevoke <trevoke@...>

I think this is what I want to do (maybe I'm thinking about it wrong):

12 messages 2009/07/22

[#342287] splitting............. — Hunt Hunt <aksn18july@...>

Hi Friends,

14 messages 2009/07/23

[#342347] Watching a website for periodic outages — Glen Holcomb <damnbigman@...>

I'm needing to monitor a web application for periodic outages and log the

14 messages 2009/07/23

[#342453] using until — Lloyd Linklater <lloyd@2live4.com>

I am writing a little thing to find all the prime numbers to a million.

17 messages 2009/07/24

[#342573] What is the power function — Prateek Agarwal <prateek.agwl@...>

I am new to Ruby and am still learning some of the basic stuff.

17 messages 2009/07/27

[#342618] Posting an XML document to a protected API — Maruthy Mentireddi <maruthymukund@...>

I am working on the FrontEnd of a website and need to make a RESTful

10 messages 2009/07/28

[#342646] Good way to not forget to install gems on a server? — Max Williams <toastkid.williams@...>

I just broke my wife's website (my current side project) because i was

12 messages 2009/07/28

[#342725] previous value in array block — Jason Lillywhite <jason.lillywhite@...>

Is this a good way to use a previous value in an array block?

20 messages 2009/07/29
[#342731] Re: previous value in array block — Harry Kakueki <list.push@...> 2009/07/29

>

[#342734] Re: previous value in array block — Jes俍 Gabriel y Gal疣 <jgabrielygalan@...> 2009/07/29

On Wed, Jul 29, 2009 at 8:18 AM, Harry Kakueki<list.push@gmail.com> wrote:

[#342737] Re: previous value in array block — Xavier Noria <fxn@...> 2009/07/29

each_cons seems natural here:

[#342781] java.text api parallel in Ruby — Venkat Akkineni <venkatram.akkineni@...>

Hi

13 messages 2009/07/29
[#342810] Re: java.text api parallel in Ruby — Robert Klemme <shortcutter@...> 2009/07/30

On 30.07.2009 00:32, Venkat Akkineni wrote:

[#342806] How Come Ruby is Text-Oriented? — Mike Stephens <rubfor@...>

I've just been re-reading Byte August 1981 - an edition dedicated to

46 messages 2009/07/30

[#342865] how to stop the subclass from overriding a method. — Venkat Akkineni <venkatram.akkineni@...>

Hi

12 messages 2009/07/30

[#342952] Ruby-net-ldap fail — Bruno Sousa <brgsousa@...>

Hi,

12 messages 2009/07/31

Re: gem list -r -d *** generates Error*** on http://gems.github.com

From: Eric Hodel <drbrain@...7.net>
Date: 2009-07-31 22:49:25 UTC
List: ruby-talk #342966
On Jul 31, 2009, at 12:00, John wrote:

> I'm using ruby 1.8.6 & gem 1.3.5  :
>
> I receive and error trying to list the details of
>
> C:\Users\spanton>gem source
> *** CURRENT SOURCES ***
>
> http://gems.github.com
>
> C:\Users\spanton>gem list -r -d
>
> *** REMOTE GEMS ***
>
> ERROR:  While executing gem ... (ArgumentError)
>    comparison of String with 3 failed
>
> Error also occurs, when using    gem list -r -d a
>
> Yet it works ok, when using       gem list -r -d b
>
> Any ideas or workaround?


$ rm -r ~/.gem/specs/gems.github.com%80/

# I did this with just a as the search first and hit this gem:

$ gem list -r -d --source http://gems.github.com -V andreasronge-neo4j

*** REMOTE GEMS ***

GET 200 OK: http://gems.github.com/latest_specs.4.8.gz
GET 200 OK: http://gems.github.com/quick/Marshal.4.8/andreasronge-neo4j-0.0.4.gemspec.rz
ERROR:  While executing gem ... (ArgumentError)
     comparison of String with 3 failed

So removing this gem from the index and rebuilding should fix the  
problem.

Anyhow, let's see why it's broken:

$ curl http://gems.github.com/quick/Marshal.4.8/andreasronge-neo4j-0.0.4.gemspec.rz 
  > neo4j.gemspec.rz

Let's dump it out:

$ ruby -rubygems -e 'Marshal.load  
Gem.inflate(File.read("neo4j.gemspec.rz"))'
/Library/Ruby/Site/1.8/rubygems/specification.rb:296:in `>':  
comparison of String with 3 failed (ArgumentError)
	from /Library/Ruby/Site/1.8/rubygems/specification.rb:296:in `_load'
	from -e:1:in `load'
	from -e:1

Yup, still fails, heavy artillery time!  Need to fake out the  
Gem::Specification stuff and dump the spec:

$ ruby -e 'module Gem; class Requirement; def marshal_load(arr) @arr =  
arr; end; def inspect() @arr end; end; Version = Requirement; class  
Specification; def self._load(str) p Marshal.load(str); nil end end;  
end; Marshal.load File.read("neo4j.gemspec")'
["1.2.0", "2", "andreasronge-neo4j", 0.0.4, Wed Oct 22 15:00:00 -0700  
2008, "A graph database for JRuby", >=#<Gem::Requirement:0x34c60>,  
 >=#<Gem::Requirement:0x34b98>, "ruby", [], "neo4j", "andreas.ronge@gmail.com 
", ["Andreas Ronge"], "A graph database for JRuby", "http://github.com/andreasronge/neo4j/tree 
", "true", "ruby", nil]

Ok, so now we have a dump of the gem.  Let's look at where the error  
came from in Gem::Specification:

    285	  ##
    286	  # Load custom marshal format, re-initializing defaults as  
needed
    287	
    288	  def self._load(str)
    289	    array = Marshal.load str
    290	
    291	    spec = Gem::Specification.new
    292	    spec.instance_variable_set :@specification_version, array[1]
    293	
    294	    current_version = CURRENT_SPECIFICATION_VERSION
    295	
-> 296	    field_count = if spec.specification_version >  
current_version then
    297                       
spec.instance_variable_set :@specification_version,
    298                                                 current_version
    299                      MARSHAL_FIELDS[current_version]
    300                    else
    301                      MARSHAL_FIELDS[spec.specification_version]
    302                    end
    303
    304      if array.size < field_count then
    305        raise TypeError, "invalid Gem::Specification format  
#{array.inspec
t}"
    306      end
    307
    308      spec.instance_variable_set :@rubygems_version,           
array[0]
    309      # spec version
    310      spec.instance_variable_set :@name,                       
array[2]
    311      spec.instance_variable_set :@version,                    
array[3]

So, specification_version is what's broken with the gem.  RubyGems  
expects it to be a number, but we can clearly see in the above dump  
that the second item is a String.  The version of the gem is stored in  
the fourth field, 0.0.4

Pulling down this project and looking through the history we find:

$ git log --grep=release
[...]
commit 0e10242e2ef63addf3ac294bb2e932202fa900fc
Author: Andreas Ronge <andreas.ronge@gmail.com>
Date:   Mon Nov 17 23:05:26 2008 +0100

     release 0.0.5, added CHANGELOG

commit 0b283793ee2c8e0689274d85f049bb8c2cf4250c
Author: andreas <andreas.ronge@gmail.com>
Date:   Thu Oct 23 16:19:27 2008 +0200

     released to rubyforge gem repository

commit 22bd9de5a5a6874ec4903af60fb5a95606f229ee
Author: andreas <andreas.ronge@gmail.com>
Date:   Thu Oct 23 10:38:33 2008 +0200

     prepare for rubyforge release of gem. Added license file

commit 715e4384f0cc34a56580c2c52054e2756c5d06ac
Author: andreas <andreas.ronge@gmail.com>
Date:   Mon Oct 20 12:13:00 2008 +0200

     released as 0.0.3. Updated documentation

So it looks like 0b283793ee2c8e0689274d85f049bb8c2cf4250c is release  
0.0.4.

$ git checkout 0b283793
$ cat neo4j.gemspec
# WARNING : RAKE AUTO-GENERATED FILE. DO NOT MANUALLY EDIT!
# LAST UPDATED : Thu Oct 23 15:05:22 +0200 2008
#
# RUN : 'rake gem:update_gemspec'

Gem::Specification.new do |s|
  s.description = "A graph database for JRuby"
  s.files = [
  # ...
  ]
  s.rubygems_version = "1.2.0"
  s.platform = "ruby"
  s.date = "Thu Oct 23 00:00:00 +0200 2008" # <-- STRING?
  s.homepage = "http://github.com/andreasronge/neo4j/tree"
  s.rubyforge_project = "neo4j"
  s.bindir = "bin"
  s.summary = "A graph database for JRuby"
  s.rdoc_options = [...]
  s.specification_version = "2" # <-- STRING?
  s.email = "andreas.ronge@gmail.com"
  s.version = "0.0.4"
  s.required_rubygems_version = ">= 0"
  s.require_paths = ["lib"]
  s.required_ruby_version = ">= 1.8.4"
  s.extra_rdoc_files = ["README.rdoc"]
  s.has_rdoc = "true"
  s.name = "neo4j"
  s.authors = ["Andreas Ronge"]
  s.loaded = "false"
end

So the gemspec has a String for specification_version.  Also, why is  
the date a String?  It should be a Time object!  It seems that this  
was hand-built.

There's a bunch of extra fields set here that RubyGems has defaults  
for, like required_rubygems_version, required_ruby_version,  
require_paths.

Hrm, what's that Rake task look like?

$ cat Rakefile
# [...]
   # Thanks to the Merb project for this code.
   desc "Update Github Gemspec"
   task :update_gemspec do
# [...]
     spec.instance_variables.each do |ivar|
       value = spec.instance_variable_get(ivar)
       name = ivar.split("@").last
# [...]
         case value
         when Array
           value = # ...
         when String
           value = # ...
         else
           value = value.to_s.inspect # WHAT?
         end
         result << " s.#{name} = #{value}\n"
       end
     end
     result << "end"
     File.open(File.join(File.dirname(__FILE__),  
"#{spec.name}.gemspec"), "w"){|f
| f << result}
   end

So the author of this gem isn't entirely to blame here.  What's  
especially strange is that this is an especially broken implementation  
of Gem::Specification#to_ruby which had RDoc all the way back to 0.8.11!

Looking in the merb source, it seems this code was added here:

commit 7d14e7e28be657c9a1a6b4f0730dd4f6d2f7031b
Author: Daniel Neighman <has.sox@gmail.com>
Date:   Fri Apr 25 13:07:49 2008 +1000

     Adds Code for generating a gemspec for github

http://github.com/wycats/merb/commit/7d14e7e28be657c9a1a6b4f0730dd4f6d2f7031b

So it looks like Daniel Neighman is to blame.  (He may not actually  
be, since he doesn't say where he got this code from.)

I'm not sure how this code was written without looking through  
Gem::Specification, nor how the author missed  
Gem::Specification#to_ruby (which is exactly what they wanted).

It appears that there are other projects infected by this code:

http://www.google.com/codesearch?q=skip_fields+new_platform+original_platform

So if you own one of these, please delete that code!

Fortunately, I now have new things to protect gem repositories from!   
(Ryan hit me for not protecting RubyGems enough)

And again, a gemspec is not something that you just dump something on.  
It's not a big truck.

In This Thread