On Nov 4, 6:14*am, Joel VanderWerf <vj...@path.berkeley.edu> wrote:
> Joel VanderWerf wrote:
>
> > Anyone else getting this error? I didn't find any recent mention of it.
>
> > gem install syntax --backtrace
> > ERROR: *While executing gem ... (ArgumentError)
> > * * invalid date
>
> Forgot to say: this is the only gem with this problem. I set up a new
> system today with about 40 other gems that installed fine, except the
> ones dependent on syntax.
>
> There's no improvement when downloading the gem file and installing it.
> The same version of syntax (1.0.0) has worked for me before, with the
> same versions of ruby and gem.
>
> $ ruby -v
> ruby 1.8.6 (2008-08-11 patchlevel 287) [i686-linux]
> $ gem --version
> 1.3.5
>
> However, I'm using gcc 4.4.1 for the first time (ubuntu 9.10).
>
> --
> * * * *vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
Hi,
I was getting the same error when installing cucumber (it depends on
diff-lcs, which depends on syntax). And after a few long hours of
fighting with this bug I have found a solution!
It turns out there is a bug in ruby 1.8.6 for 64 bit architecture. And
guess what, the problem is with date. You can read more about the bug,
and the solution, here:
http://redmine.ruby-lang.org/issues/show/1735.
So, to solve the problem I had to compile ruby myself. Here are the
steps I did:
1) wget
ftp://ftp.ruby-lang.org/pub/ruby/1.8....6-p286.tar.gz
2) tar zxf ruby-1.8.6-p286.tar.gz
3) cd ruby-1.8.6-p286
Now I changed some ext settings, as described here:
http://blog.ghandal.net/2009/01/
4) vim ext/Setup, and uncomment some extensions:
#Win32API
#bigdecimal
curses
#dbm
digest
digest/md5
#digest/rmd160
digest/sha1
digest/sha2
dl
enumerator
#etc
#fcntl
#gdbm
iconv
#io/wait
#nkf
#pty
openssl
#racc/cparse
readline
#sdbm
socket
stringio
strscan
syck
syslog
#tcltklib
thread
#tk
#win32ole
zlib
5) ./configure --prefix=/usr/local --with-openssl-dir=/usr --with-
readline-dir=/usr --with-zlib-dir=/usr
This assumes ruby will be install under /usr/local
Now before you run make, you MUST apply the fix from here:
http://redmine.ruby-lang.org/issues/show/1735
6) vim Makefile
and apply the fix:
- CFLAGS = -g -O2 -DRUBY_EXPORT -D_GNU_SOURCE=1
+ CFLAGS = -g -DRUBY_EXPORT -D_GNU_SOURCE=1
save the file and then
7) make

sudo make install
Then I would suggest installing rubygems manually:
9) wget
http://rubyforge.org/frs/download.ph...gems-1.3.5.tgz
10) tar zxf rubygems-1.3.5.tgz
11) cd rubygems-1.3.5/
12) sudo ruby setup.rb
Now you should be all set and ready to install the syntax gem, and any
others than depend on it, like cucumber in my case.
Wow, I must admit that was my longest ruby installation ever ...
Good luck!
Kind regards,
Marcin Domanski