invalid date error when installing syntax gem

Discussion in 'Ruby' started by Joel VanderWerf, Nov 4, 2009.

  1. 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
    /usr/local/lib/ruby/1.8/date.rb:727:in `new'
    /usr/local/lib/ruby/1.8/yaml.rb:133:in `node_import'
    /usr/local/lib/ruby/1.8/yaml.rb:133:in `load'
    /usr/local/lib/ruby/1.8/yaml.rb:133:in `load'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:476:in
    `from_yaml'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:182:in
    `load_gemspec'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:50:in
    `initialize'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:63:in
    `each'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:54:in
    `loop'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:54:in
    `each'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:31:in
    `initialize'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:16:in `new'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:16:in
    `open'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/package.rb:56:in `open'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/format.rb:67:in `from_io'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/format.rb:51:in
    `from_file_by_path'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/format.rb:50:in `open'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/format.rb:50:in
    `from_file_by_path'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/installer.rb:119:in `initialize'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:239:in
    `new'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:239:in
    `install'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:222:in
    `each'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:222:in
    `install'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:118:in
    `execute'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:115:in
    `each'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:115:in
    `execute'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/command.rb:257:in `invoke'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:132:in
    `process_args'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:102:in `run'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:58:in `run'
    /usr/local/bin/gem:21

    --
    vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
     
    Joel VanderWerf, Nov 4, 2009
    #1
    1. Advertising

  2. 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
     
    Joel VanderWerf, Nov 4, 2009
    #2
    1. Advertising

  3. Joel VanderWerf

    dondoman Guest

    On Nov 4, 6:14 am, Joel VanderWerf <> 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/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
    8) sudo make install

    Then I would suggest installing rubygems manually:

    9) wget http://rubyforge.org/frs/download.php/60718/rubygems-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
     
    dondoman, Nov 26, 2009
    #3
  4. Joel VanderWerf

    Luis Lavena Guest

    On Nov 4, 2:14 am, Joel VanderWerf <> 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).
    >


    The problem is related to gcc 4.4 and some issue with date parsing.

    Try getting gcc (Ubuntu 4.4.2-1ubuntu4) 4.4.2

    --
    Luis Lavena
     
    Luis Lavena, Nov 27, 2009
    #4
  5. Luis Lavena wrote:
    > The problem is related to gcc 4.4 and some issue with date parsing.
    >
    > Try getting gcc (Ubuntu 4.4.2-1ubuntu4) 4.4.2


    Thanks!

    I tried to find 4.4.2 in karmic-proposed or karmic-backports, but no
    luck. Do you install 4.4.2 from lucid? From source?

    I added a comment on launchpad about this... I would hope that, since
    4.4.2 is a bugfix release, it gets pushed into the updates for karmic.

    --
    vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
     
    Joel VanderWerf, Nov 27, 2009
    #5
  6. Joel VanderWerf

    Victor Guest

    Any news on this? I'm having the same issue and I guess I'll have to
    go through the manual install if there has been no patch submitted
    yet...

    Thanks
    Victor

    On Nov 27, 3:03 pm, Joel VanderWerf <> wrote:
    > Luis Lavena wrote:
    > > The problem is related to gcc 4.4 and some issue with date parsing.

    >
    > > Try getting gcc (Ubuntu 4.4.2-1ubuntu4) 4.4.2

    >
    > Thanks!
    >
    > I tried to find 4.4.2 in karmic-proposed or karmic-backports, but no
    > luck. Do you install 4.4.2 from lucid? From source?
    >
    > I added a comment on launchpad about this... I would hope that, since
    > 4.4.2 is a bugfix release, it gets pushed into the updates for karmic.
    >
    > --
    >        vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
     
    Victor, Dec 2, 2009
    #6
  7. Victor wrote:
    > Any news on this? I'm having the same issue and I guess I'll have to
    > go through the manual install if there has been no patch submitted
    > yet...
    >
    > Thanks
    > Victor
    >
    > On Nov 27, 3:03 pm, Joel VanderWerf <> wrote:
    >> Luis Lavena wrote:
    >>> The problem is related to gcc 4.4 and some issue with date parsing.
    >>> Try getting gcc (Ubuntu 4.4.2-1ubuntu4) 4.4.2

    >> Thanks!
    >>
    >> I tried to find 4.4.2 in karmic-proposed or karmic-backports, but no
    >> luck. Do you install 4.4.2 from lucid? From source?
    >>
    >> I added a comment on launchpad about this... I would hope that, since
    >> 4.4.2 is a bugfix release, it gets pushed into the updates for karmic.



    Victor,

    if you're on ubuntu, you can install gcc-4.3, export CC='gcc-4.3', and
    rebuild ruby. Anyway, that fixed it for me.

    --
    vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
     
    Joel VanderWerf, Dec 2, 2009
    #7
  8. Joel VanderWerf

    Anatoly Sh Guest

    I use Ruby Enterprise Edition. I got around the problem by installing
    the latest REE version (ruby-enterprise-1.8.7-2009.10)
    --
    Posted via http://www.ruby-forum.com/.
     
    Anatoly Sh, Dec 26, 2009
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,278
    Michael Borgwardt
    May 30, 2004
  2. Austin 7873
    Replies:
    5
    Views:
    191
    Eric Hodel
    Jan 27, 2007
  3. Pat Maddox
    Replies:
    2
    Views:
    117
    David Masover
    Aug 3, 2008
  4. Nasir Khan
    Replies:
    0
    Views:
    106
    Nasir Khan
    Jun 8, 2009
  5. Brandon Simmons
    Replies:
    0
    Views:
    352
    Brandon Simmons
    Dec 22, 2010
Loading...

Share This Page