librelist archives

« back to archive

Oh oh, problems right when I start

Oh oh, problems right when I start

From:
Oren Shani
Date:
2012-04-11 @ 18:45
<html style="direction: ltr;">
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <style>body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
  </head>
  <body style="direction: ltr;"
    bidimailui-detected-decoding-type="latin-charset" text="#000000"
    bgcolor="#FFFFFF">
    Hi,<br>
    <br>
    Just making the first steps and problems already...<br>
    <br>
    I did gem install bundler and gem install nesta, but this is what
    happens next:<br>
    <br>
    orenshani@orenshani-laptop:~/nesta$ nesta new mysite.com<br>
    Invalid gemspec in
    [/var/lib/gems/1.8/specifications/tilt-1.3.3.gemspec]: invalid date
    format in specification: "2011-08-25 00:00:00.000000000Z"<br>
    Invalid gemspec in
    [/var/lib/gems/1.8/specifications/mime-types-1.18.gemspec]: invalid
    date format in specification: "2012-03-21 00:00:00.000000000Z"<br>
    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
    `gem_original_require': no such file to load -- tilt (LoadError)<br>
        from
    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
    `require'<br>
        from 
/var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:3<br>
        from
    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
    `gem_original_require'<br>
        from
    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
    `require'<br>
        from 
/var/lib/gems/1.8/gems/nesta-0.9.13/lib/nesta/app.rb:1<br>
        from
    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
    `gem_original_require'<br>
        from
    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
    `require'<br>
        from 
/var/lib/gems/1.8/gems/nesta-0.9.13/lib/nesta/commands.rb:5<br>
        from
    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
    `gem_original_require'<br>
        from
    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
    `require'<br>
        from /var/lib/gems/1.8/gems/nesta-0.9.13/bin/nesta:5<br>
        from /usr/local/bin/nesta:19:in `load'<br>
        from /usr/local/bin/nesta:19<br>
    <br>
    I'm on Ubuntu 11.10, Ruby 1.8.7<br>
    <br>
    Appreciate any help...<br>
    <br>
    Thanks<br>
    <br>
    Oren<br>
  </body>
</html>

Re: [nesta] Oh oh, problems right when I start

From:
Max Sadrieh
Date:
2012-04-11 @ 19:46
Hi Oren,

It seems the e-mail you sent was in HTML and not plain text and for
some reason librelist.com forced a plain text mime type, which made
your e-mail very difficult to read. I cleaned it up and quoted it
below. If you could make sure you selected "Plain Text" right above
the message in Gmail (there are also similar options in programs like
Thunderbird or Outlook).

To get back to your problem, it seems ruby cannot parse the date
"2012-03-21 00:00:00.000000000Z" that are in gemspec files. Could you
please give us the output of the following commands:

ruby -v # Just to make sure

cat /var/lib/gems/1.8/specifications/tilt-1.3.3.gemspec # Probably long output

It seems your problem is similar to that describe in this pastebin
[1]. The solution described is to move to ruby1.9. But I'm running
nesta on Debian stable with the following version:
ruby 1.8.7 (2010-08-16 patchlevel 302) [i486-linux]

Did you run `bundle`?

[1] http://pastebin.com/nVkGXLad

-Max

On Wed, Apr 11, 2012 at 2:45 PM, Oren Shani <orenshani7@gmail.com> wrote:
>    Hi,
>
>    Just making the first steps and problems already...
>
>    I did gem install bundler and gem install nesta, but this is what
>    happens next:
>
>    orenshani@orenshani-laptop:~/nesta$ nesta new mysite.com
>    Invalid gemspec in
>    [/var/lib/gems/1.8/specifications/tilt-1.3.3.gemspec]: invalid date
>    format in specification: "2011-08-25 00:00:00.000000000Z"
>    Invalid gemspec in
>    [/var/lib/gems/1.8/specifications/mime-types-1.18.gemspec]: invalid
>    date format in specification: "2012-03-21 00:00:00.000000000Z"
>    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
>    `gem_original_require': no such file to load -- tilt (LoadError)
>     from
>    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
>    `require'
>     from /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:3
>     from
>    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
>    `gem_original_require'
>     from
>    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
>    `require'
>     from /var/lib/gems/1.8/gems/nesta-0.9.13/lib/nesta/app.rb:1
>     from
>    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
>    `gem_original_require'
>     from
>    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
>    `require'
>     from /var/lib/gems/1.8/gems/nesta-0.9.13/lib/nesta/commands.rb:5
>     from
>    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
>    `gem_original_require'
>     from
>    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
>    `require'
>     from /var/lib/gems/1.8/gems/nesta-0.9.13/bin/nesta:5
>     from /usr/local/bin/nesta:19:in `load'
>     from /usr/local/bin/nesta:19
>
>    I'm on Ubuntu 11.10, Ruby 1.8.7
>
>    Appreciate any help...
>
>    Thanks
>
>    Oren

Re: [nesta] Oh oh, problems right when I start

From:
Graham Ashton
Date:
2012-04-12 @ 09:09
On 11 Apr 2012, at 20:46, Max Sadrieh wrote:

> it seems ruby cannot parse the date
> "2012-03-21 00:00:00.000000000Z" that are in gemspec files.
> 
> [snip]
> 
> It seems your problem is similar to that describe in this pastebin
> [1]. The solution described is to move to ruby1.9. But I'm running
> nesta on Debian stable with the following version:
> ruby 1.8.7 (2010-08-16 patchlevel 302) [i486-linux]

Hmmm. This kind of problem with rubygems has been taunting me for a while.

In Ruby 1.8 Yaml was handled by a library called syck. For 1.9 Aaron 
Patterson has been working on a replacement called Psych. They don't 
behave in quite the same way. Up until recently (when Evan Phoenix 
declared the problem fixed) some gems that were built with 1.9 were 
uninstallable on 1.8.

The error you get under these circumstances was slightly different to 
yours, but this is why I removed Nesta 0.9.6 and 0.9.12 from rubygems.org.

Aaron has written about the problem here:

http://blog.rubygems.org/2011/08/31/shaving-the-yaml-yak.html

So I said the problem I'm familiar with is slightly different. That means 
I don't have a suggested "do this and it'll work" fix.

I just found this post:


http://pivotallabs.com/users/mkocher/blog/articles/1692-yaml-psych-and-ruby-1-9-2-p180-here-there-be-dragons

Which leads me to this question; could you both check whether you have the
libyaml package (and libyaml-dev if you've built Ruby from source) 
installed?

If Matthew's post has identified Oren's issue, it'd suggest that Oren will
have libyaml installed but Max won't...

Also Oren, what version of rubygems have you got installed? Check Evan's 
comment at the bottom of Aaron's blog post about a rubygems upgrade fixing
some of these problems.

Re: [nesta] Oh oh, problems right when I start

From:
Max Sadrieh
Date:
2012-04-12 @ 14:28
I have libyaml-0-2 (where I believe the -2 is Debian specific
versioning) install on both my development and production machines.

On the other hand, my tilt.gemspec (located at
/var/lib/gems/1.8/gems/tilt-1.3.3/tilt.gemspec) has the following
first few lines:

Gem::Specification.new do |s|
  s.specification_version = 2 if s.respond_to? :specification_version=
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if
s.respond_to? :required_rubygems_version=

  s.name = 'tilt'
  s.version = '1.3.3'
  s.date = '2011-08-25'

  [...]
end

Notice the date is only YYYY-MM-DD and does not have minutes and
seconds and timezone (?).

My rubygems very is 1.3.7-3 (once again, -3 is Debian/Ubuntu specific AFAIK).

Hope that helps.

-Max

Re: [nesta] Oh oh, problems right when I start

From:
Max Sadrieh
Date:
2012-04-12 @ 15:43
If I modify my tilt.gemspec to have "2011-08-25 00:00:00.000000000Z"
instead of "2011-08-25", I get the following (similar) error:

/usr/lib/ruby/vendor_ruby/1.8/rubygems/specification.rb:1000:in
`date=': invalid date format in specification: "2011-08-25
00:00:00.000000000Z" (Gem::InvalidSpecificationException)
	from /home/_/Code/Projects/tilt/tilt.gemspec:7
	from /usr/lib/ruby/vendor_ruby/1.8/rubygems/specification.rb:1356:in
`initialize'
	from /home/_/Code/Projects/tilt/tilt.gemspec:1:in `new'
	from /home/_/Code/Projects/tilt/tilt.gemspec:1

I think the temporary solution is to edit your tilt.gemspec and
mime-types.gemspec manually.

The longer term solution is to upgrade some gems.  Googling led to
people mentioning upgrading rubygems, bundler, etc. Some links:

https://github.com/sstephenson/execjs/issues/33#issuecomment-1733646

http://stackoverflow.com/questions/5771758/invalid-gemspec-because-of-the-date-format-in-specification

http://stackoverflow.com/questions/7290575/invalid-date-format-specification-in-gemspec/7290949#7290949

http://help.rubygems.org/discussions/problems/680-invalid-gemspec-and-invalid-date-format-in-specification-2011-05-03-000000000000000z
http://community.opscode.com/chat/chef/2012-03-29

Since you're on Ubuntu, gem update --system will probably not let you
go ahead and overwrite the apt package file. You can do a few things
about that:
1. Ignore it by running
  REALLY_GEM_UPDATE_SYSTEM=1 gem update --system
2. Upgrade to 12.04 (either the final beta or by waiting a bit, in
particular since you can fix the issue temporarily by replacing the
dates) and get 1.8, see:
  
http://packages.ubuntu.com/search?keywords=rubygems&searchon=names&suite=all§ion=all

Cheers.

-Max

Re: [nesta] Oh oh, problems right when I start

From:
Oren Shani
Date:
2012-04-12 @ 03:52
Hi Max,

See the info you asked for below.


Many thanks!

Oren

$ ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]

$ bundle
Invalid gemspec in 
[/var/lib/gems/1.8/specifications/tilt-1.3.3.gemspec]: invalid date 
format in specification: "2011-08-25 00:00:00.000000000Z"
Invalid gemspec in 
[/var/lib/gems/1.8/specifications/mime-types-1.18.gemspec]: invalid date 
format in specification: "2012-03-21 00:00:00.000000000Z"
Could not locate Gemfile

$ cat /var/lib/gems/1.8/specifications/tilt-1.3.3.gemspec
# -*- encoding: utf-8 -*-

Gem::Specification.new do |s|
   s.name = %q{tilt}
   s.version = "1.3.3"

   s.required_rubygems_version = Gem::Requirement.new(">= 0") if 
s.respond_to? :required_rubygems_version=
   s.authors = ["Ryan Tomayko"]
   s.date = %q{2011-08-25 00:00:00.000000000Z}
   s.description = %q{Generic interface to multiple Ruby template engines}
   s.email = %q{r@tomayko.com}
   s.executables = ["tilt"]
   s.files = ["bin/tilt"]
   s.homepage = %q{http://github.com/rtomayko/tilt/}
   s.rdoc_options = ["--line-numbers", "--inline-source", "--title", 
"Tilt", "--main", "Tilt"]
   s.require_paths = ["lib"]
   s.rubygems_version = %q{1.7.2}
   s.summary = %q{Generic interface to multiple Ruby template engines}

   if s.respond_to? :specification_version then
     s.specification_version = 2

     if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
       s.add_development_dependency(%q<contest>, [">= 0"])
       s.add_development_dependency(%q<builder>, [">= 0"])
       s.add_development_dependency(%q<erubis>, [">= 0"])
       s.add_development_dependency(%q<haml>, [">= 2.2.11"])
       s.add_development_dependency(%q<sass>, [">= 0"])
       s.add_development_dependency(%q<rdiscount>, [">= 0"])
       s.add_development_dependency(%q<liquid>, [">= 0"])
       s.add_development_dependency(%q<less>, [">= 0"])
       s.add_development_dependency(%q<radius>, [">= 0"])
       s.add_development_dependency(%q<nokogiri>, [">= 0"])
       s.add_development_dependency(%q<markaby>, [">= 0"])
       s.add_development_dependency(%q<coffee-script>, [">= 0"])
       s.add_development_dependency(%q<bluecloth>, [">= 0"])
       s.add_development_dependency(%q<RedCloth>, [">= 0"])
       s.add_development_dependency(%q<maruku>, [">= 0"])
       s.add_development_dependency(%q<creole>, [">= 0"])
       s.add_development_dependency(%q<kramdown>, [">= 0"])
       s.add_development_dependency(%q<redcarpet>, [">= 0"])
       s.add_development_dependency(%q<creole>, [">= 0"])
       s.add_development_dependency(%q<yajl-ruby>, [">= 0"])
       s.add_development_dependency(%q<wikicloth>, [">= 0"])
       s.add_development_dependency(%q<redcarpet>, [">= 0"])
       s.add_development_dependency(%q<kramdown>, [">= 0"])
     else
       s.add_dependency(%q<contest>, [">= 0"])
       s.add_dependency(%q<builder>, [">= 0"])
       s.add_dependency(%q<erubis>, [">= 0"])
       s.add_dependency(%q<haml>, [">= 2.2.11"])
       s.add_dependency(%q<sass>, [">= 0"])
       s.add_dependency(%q<rdiscount>, [">= 0"])
       s.add_dependency(%q<liquid>, [">= 0"])
       s.add_dependency(%q<less>, [">= 0"])
       s.add_dependency(%q<radius>, [">= 0"])
       s.add_dependency(%q<nokogiri>, [">= 0"])
       s.add_dependency(%q<markaby>, [">= 0"])
       s.add_dependency(%q<coffee-script>, [">= 0"])
       s.add_dependency(%q<bluecloth>, [">= 0"])
       s.add_dependency(%q<RedCloth>, [">= 0"])
       s.add_dependency(%q<maruku>, [">= 0"])
       s.add_dependency(%q<creole>, [">= 0"])
       s.add_dependency(%q<kramdown>, [">= 0"])
       s.add_dependency(%q<redcarpet>, [">= 0"])
       s.add_dependency(%q<creole>, [">= 0"])
       s.add_dependency(%q<yajl-ruby>, [">= 0"])
       s.add_dependency(%q<wikicloth>, [">= 0"])
       s.add_dependency(%q<redcarpet>, [">= 0"])
       s.add_dependency(%q<kramdown>, [">= 0"])
     end
   else
     s.add_dependency(%q<contest>, [">= 0"])
     s.add_dependency(%q<builder>, [">= 0"])
     s.add_dependency(%q<erubis>, [">= 0"])
     s.add_dependency(%q<haml>, [">= 2.2.11"])
     s.add_dependency(%q<sass>, [">= 0"])
     s.add_dependency(%q<rdiscount>, [">= 0"])
     s.add_dependency(%q<liquid>, [">= 0"])
     s.add_dependency(%q<less>, [">= 0"])
     s.add_dependency(%q<radius>, [">= 0"])
     s.add_dependency(%q<nokogiri>, [">= 0"])
     s.add_dependency(%q<markaby>, [">= 0"])
     s.add_dependency(%q<coffee-script>, [">= 0"])
     s.add_dependency(%q<bluecloth>, [">= 0"])
     s.add_dependency(%q<RedCloth>, [">= 0"])
     s.add_dependency(%q<maruku>, [">= 0"])
     s.add_dependency(%q<creole>, [">= 0"])
     s.add_dependency(%q<kramdown>, [">= 0"])
     s.add_dependency(%q<redcarpet>, [">= 0"])
     s.add_dependency(%q<creole>, [">= 0"])
     s.add_dependency(%q<yajl-ruby>, [">= 0"])
     s.add_dependency(%q<wikicloth>, [">= 0"])
     s.add_dependency(%q<redcarpet>, [">= 0"])
     s.add_dependency(%q<kramdown>, [">= 0"])
   end
end


On 04/11/2012 10:46 PM, Max Sadrieh wrote:
> Hi Oren,
>
> It seems the e-mail you sent was in HTML and not plain text and for
> some reason librelist.com forced a plain text mime type, which made
> your e-mail very difficult to read. I cleaned it up and quoted it
> below. If you could make sure you selected "Plain Text" right above
> the message in Gmail (there are also similar options in programs like
> Thunderbird or Outlook).
>
> To get back to your problem, it seems ruby cannot parse the date
> "2012-03-21 00:00:00.000000000Z" that are in gemspec files. Could you
> please give us the output of the following commands:
>
> ruby -v # Just to make sure
>
> cat /var/lib/gems/1.8/specifications/tilt-1.3.3.gemspec # Probably long output
>
> It seems your problem is similar to that describe in this pastebin
> [1]. The solution described is to move to ruby1.9. But I'm running
> nesta on Debian stable with the following version:
> ruby 1.8.7 (2010-08-16 patchlevel 302) [i486-linux]
>
> Did you run `bundle`?
>
> [1] http://pastebin.com/nVkGXLad
>
> -Max
>
> On Wed, Apr 11, 2012 at 2:45 PM, Oren Shani<orenshani7@gmail.com>  wrote:
>>     Hi,
>>
>>     Just making the first steps and problems already...
>>
>>     I did gem install bundler and gem install nesta, but this is what
>>     happens next:
>>
>>     orenshani@orenshani-laptop:~/nesta$ nesta new mysite.com
>>     Invalid gemspec in
>>     [/var/lib/gems/1.8/specifications/tilt-1.3.3.gemspec]: invalid date
>>     format in specification: "2011-08-25 00:00:00.000000000Z"
>>     Invalid gemspec in
>>     [/var/lib/gems/1.8/specifications/mime-types-1.18.gemspec]: invalid
>>     date format in specification: "2012-03-21 00:00:00.000000000Z"
>>     /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
>>     `gem_original_require': no such file to load -- tilt (LoadError)
>>      from
>>     /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
>>     `require'
>>      from /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:3
>>      from
>>     /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
>>     `gem_original_require'
>>      from
>>     /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
>>     `require'
>>      from /var/lib/gems/1.8/gems/nesta-0.9.13/lib/nesta/app.rb:1
>>      from
>>     /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
>>     `gem_original_require'
>>      from
>>     /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
>>     `require'
>>      from /var/lib/gems/1.8/gems/nesta-0.9.13/lib/nesta/commands.rb:5
>>      from
>>     /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
>>     `gem_original_require'
>>      from
>>     /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in
>>     `require'
>>      from /var/lib/gems/1.8/gems/nesta-0.9.13/bin/nesta:5
>>      from /usr/local/bin/nesta:19:in `load'
>>      from /usr/local/bin/nesta:19
>>
>>     I'm on Ubuntu 11.10, Ruby 1.8.7
>>
>>     Appreciate any help...
>>
>>     Thanks
>>
>>     Oren