On Thursday, 20 June 2013 11:51:56 UTC-7, Colin Law wrote:
>
> On 20 June 2013 17:58, Muthu Selvan <[email protected] <javascript:>> 
> wrote: 
> > 
> > My problem is : 
> > 
> > I am running "cucumber" ..This is using library for "rounding decimal" 
> > values .. its not running .. 
> > 
> >  I am getting the below error 
> > 
> >  float_add.rb:5:in `round': wrong number of arguments (1 for 0) 
> > (ArgumentError) 
> > from float_add.rb:5 
> > 
> > Code : 
> > 
> > f1=0.5367 
> > f2=0.8156 
> > f3 = f2 - f1 
> > puts f3 
> > f4 = f3.round(2) 
> > puts f4 
> > 
> > i want rounding the value in ruby when run it from "cucumber" command 
> ..if i 
> > use rvm use 1.9.3 / rvm use 1.8.7 ..it not working .. 
>
> In a terminal run 
> rvm use 1.9.3 
> which ruby 
> ruby -v 
> irb 
> 1.95.round(2) 
>
> Copy and paste the complete results here. 
>
> Colin 
>


  Please check the result here ..it working now ..but same "round" command 
is not working when i invoking the from "cucumber" ..and its using ruby 
1.8.7 

   mselv2m1:java_Code mselv2$ rvm use 1.9.2
   Using /Users/mselv2/.rvm/gems/ruby-1.9.2-p320

   mselv2m1:java_Code mselv2$ which ruby
  /Users/mselv2/.rvm/rubies/ruby-1.9.2-p320/bin/ruby
  
  mselv2m1:java_Code mselv2$ ruby -v
  ruby 1.9.2p320 (2012-04-20) [x86_64-darwin12.4.0]
  
 mselv2m1:java_Code mselv2$ irb
 1.9.2p320 :001 > 1.456.round(2)
 => 1.46 


This is error i am getting when running cucumber command ( internally its 
using ruby )  which is using ruby 1.9.2
------------
$rvm use 1.9.2
Using: /Users/mselv2/.rvm/gems/ruby-1.9.2-p320@calabash
------------
mselv2m1:nikeplus-running-ios mselv2$ *cucumber* 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in
 
`report_activate_error': Could not find RubyGem cucumber (>= 0) 
(Gem::LoadError)
from 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:in
 
`activate'
from 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in
 
`gem'
from /usr/bin/cucumber:18
mselv2m1:nikeplus-running-ios mselv2$ 

Thanks ,
Muthu Selvan SR
   

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/e0027352-3871-4a48-b31b-cd030ce1e24e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to