good day i read about relativity gem but when i try to use it and make
a test file and build it gives me an error

=test.rb=
<pre>

require 'relativity'
opens_at = DayTime.new(9) #=> 09:00:00
closes_at = DayTime.new(12,30) #=> 12:30:00
</pre>


<pre>
/home/start/.rvm/gems/ruby-1.9.2-p290/gems/relativity-0.0.8/lib/
relativity/day_time/new.rb:24:in `BigDecimal': can't convert Fixnum
into String (TypeError)
from /home/start/.rvm/gems/ruby-1.9.2-p290/gems/relativity-0.0.8/lib/
relativity/day_time/new.rb:24:in `initialize'
from /home/start/Aptana Studio 3 Workspace/jquery/javascript/test.rb:
2:in `new'
from /home/start/Aptana Studio 3 Workspace/jquery/javascript/test.rb:
2:in `<main>'
</pre>

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Peter Vandenabeele at Mar 1, 2012 at 12:58 pm

    On Wed, Feb 29, 2012 at 6:42 PM, rubytalks wrote:
    good day i read about relativity gem but when i try to use it and make
    a test file and build it gives me an error

    =test.rb=
    <pre>

    require 'relativity'
    opens_at = DayTime.new(9) #=> 09:00:00
    closes_at = DayTime.new(12,30) #=> 12:30:00
    </pre>


    <pre>
    /home/start/.rvm/gems/ruby-1.9.2-p290/gems/relativity-0.0.8/lib/
    relativity/day_time/new.rb:24:in `BigDecimal': can't convert Fixnum
    into String (TypeError)
    Thanks for the feedback.

    For ruby 1.9.2 this was indeed a bug in version 0.0.8.
    (because BigDecimal.new() did not take Integer argument).

    I resolved that in version 0.0.9, so could you check please which
    version of relativity you are using.

    To update to a new version, in a gemset that I had not updated yet,
    I could successfully run this (did that just now):

    $ gem list | grep relativity
    relativity (0.0.8, 0.0.7, 0.0.6, 0.0.3)
    $ gem install relativity
    Fetching: relativity-0.0.9.gem (100%)
    Successfully installed relativity-0.0.9
    1 gem installed
    $ irb
    1.9.2p290 :001 > require 'relativity'
    => true
    1.9.2p290 :002 > DayTime.new
    => 13:56:55

    Note: it will not work at al in ruby 1.8.x because I am
    using some newer Regexp features.

    Thanks,

    Peter

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedMar 1, '12 at 12:44p
activeMar 1, '12 at 12:58p
posts2
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Peter Vandenabeele: 1 post Rubytalks: 1 post

People

Translate

site design / logo © 2022 Grokbase