[HELP] ruby 1.9.2 is not showing in gem environment ( GEM PATH)

Hi All ,

Installed ruby 1.9.2 , if i use rvm use command its showing using ruby 1.9.2 only but in my gem environment ( GEM PATHS) is not showing …

$ rvm use 1.9.2

Using /Users/mselv2/.rvm/gems/ruby-1.9.2-p320

mselv2m1:nikeplus-running-ios mselv2$ gem environment

RubyGems Environment:

  • RUBYGEMS VERSION: 1.8.25

  • RUBY VERSION: 1.8.7 (2012-10-12 patchlevel 371) [i686-darwin12.4.0]

  • INSTALLATION DIRECTORY: /Users/mselv2/.rvm/gems/ruby-1.8.7-p371

  • RUBY EXECUTABLE: /Users/mselv2/.rvm/rubies/ruby-1.8.7-p371/bin/ruby

  • EXECUTABLE DIRECTORY: /Users/mselv2/.rvm/gems/ruby-1.8.7-p371/bin

  • RUBYGEMS PLATFORMS:

  • ruby

  • x86-darwin-12

  • GEM PATHS:

  • /Users/mselv2/.rvm/gems/ruby-1.8.7-p371

  • /Users/mselv2/.rvm/gems/ruby-1.8.7-p371@global

  • GEM CONFIGURATION:

  • :update_sources => true

  • :verbose => true

  • :benchmark => false

  • :backtrace => false

  • :bulk_threshold => 1000

  • “gem” => “–no-rdoc --no-ri”

  • REMOTE SOURCES:

  • http://rubygems.org/

Because of this , cucumber is not working and getting below error when i use rvm 1.9.2

/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

PLEASE help to solve this issue …

Thanks ,

Muthu Selvan SR

Hi All ,

Installed ruby 1.9.2 , if i use rvm use command its showing using ruby 1.9.2 only but in my gem environment ( GEM PATHS) is not showing ..

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

mselv2m1:nikeplus-running-ios mselv2$ gem environment RubyGems Environment:   - RUBYGEMS VERSION: 1.8.25   - RUBY VERSION: 1.8.7 (2012-10-12 patchlevel 371) [i686-darwin12.4.0]

I notice that you have changed directory between the rvm use command and the gem environment command. What happens if you say rvm use immediately before gem environment? Also what do you get for rvm info

Colin

Colin

Please my o/p for rvm info …when rvm use 1.8.7

$ rvm use 1.8.7

Using /Users/mselv2/.rvm/gems/ruby-1.8.7-p371

mselv2m1:Downloads mselv2$ rvm info

ruby-1.8.7-p371:

system:

uname: “Darwin mselv2m1 12.4.0 Darwin Kernel Version 12.4.0: Wed May 1 17:57:12 PDT 2013; root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64”

system: “osx/10.8/x86_64”

bash: “/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin12)”

zsh: “/bin/zsh => zsh 4.3.11 (i386-apple-darwin12.0)”

rvm:

version: “rvm 1.20.13 (stable) by Wayne E. Seguin wayneeseguin@gmail.com, Michal Papis mpapis@gmail.com [https://rvm.io/]”

updated: “2 days 14 hours 1 minute 28 seconds ago”

ruby:

interpreter: “ruby”

version: “1.8.7”

date: “2012-10-12”

platform: “i686-darwin12.4.0”

patchlevel: “2012-10-12 patchlevel 371”

full_version: “ruby 1.8.7 (2012-10-12 patchlevel 371) [i686-darwin12.4.0]”

homes:

gem: “/Users/mselv2/.rvm/gems/ruby-1.8.7-p371”

ruby: “/Users/mselv2/.rvm/rubies/ruby-1.8.7-p371”

binaries:

ruby: “/Users/mselv2/.rvm/rubies/ruby-1.8.7-p371/bin/ruby”

irb: “/Users/mselv2/.rvm/rubies/ruby-1.8.7-p371/bin/irb”

gem: “/Users/mselv2/.rvm/rubies/ruby-1.8.7-p371/bin/gem”

rake: “/Users/mselv2/.rvm/gems/ruby-1.8.7-p371@global/bin/rake”

environment:

PATH: “/Users/mselv2/.rvm/gems/ruby-1.8.7-p371/bin:/Users/mselv2/.rvm/gems/ruby-1.8.7-p371@global/bin:/Users/mselv2/.rvm/rubies/ruby-1.8.7-p371/bin:/Users/mselv2/.rvm/bin:/Users/mselv2/.rbenv/shims:/Users/mselv2/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/adt-bundle-mac-x86_64-20130219/sdk/tools:/Applications/adt-bundle-mac-x86_64-20130219/sdk/platform-tools”

GEM_HOME: “/Users/mselv2/.rvm/gems/ruby-1.8.7-p371”

GEM_PATH: “/Users/mselv2/.rvm/gems/ruby-1.8.7-p371:/Users/mselv2/.rvm/gems/ruby-1.8.7-p371@global”

MY_RUBY_HOME: “/Users/mselv2/.rvm/rubies/ruby-1.8.7-p371”

IRBRC: “/Users/mselv2/.rvm/rubies/ruby-1.8.7-p371/.irbrc”

RUBYOPT: “”

gemset: “”

Please don't top post, it makes it difficult to follow the thread, insert your reply at appropriate points in previous message, thanks. Also it makes it easy to forget to answer some of the questions. In particular you have not answered the question what happens if you run rvm use 1.9.2, immediately followed by gem environment?

Colin

I will do that …

Please check the rvm use O/ P :

mselv2m1:Downloads mselv2$ gem environment

RubyGems Environment:

  • RUBYGEMS VERSION: 1.8.25

  • RUBY VERSION: 1.9.2 (2012-04-20 patchlevel 320) [x86_64-darwin12.4.0]

  • INSTALLATION DIRECTORY: /Users/mselv2/.rvm/gems/ruby-1.9.2-p320

  • RUBY EXECUTABLE: /Users/mselv2/.rvm/rubies/ruby-1.9.2-p320/bin/ruby

  • EXECUTABLE DIRECTORY: /Users/mselv2/.rvm/gems/ruby-1.9.2-p320/bin

  • RUBYGEMS PLATFORMS:

  • ruby

  • x86_64-darwin-12

  • GEM PATHS:

  • /Users/mselv2/.rvm/gems/ruby-1.9.2-p320

  • /Users/mselv2/.rvm/gems/ruby-1.9.2-p320@global

  • GEM CONFIGURATION:

  • :update_sources => true

  • :verbose => true

  • :benchmark => false

  • :backtrace => false

  • :bulk_threshold => 1000

  • “gem” => “–no-rdoc --no-ri”

  • REMOTE SOURCES:

  • http://rubygems.org/

I will do that ..

You will do what? You are still top posting so I have no idea what question you are answering.

Please check the rvm use O/ P :

mselv2m1:Downloads mselv2$ gem environment RubyGems Environment:   - RUBYGEMS VERSION: 1.8.25   - RUBY VERSION: 1.9.2 (2012-04-20 patchlevel 320) [x86_64-darwin12.4.0]

So that is showing 1.9.2 as expected. So is your problem fixed? If not then please explain the problem again.

Also please just reply to the list, there is no need to send me a copy, thanks.

Colin

Coin ,

Really sorry for posting on top …

My problem is not solved …

Please find the gem environment detail and rvm use command detail

mselv2m1:Downloads mselv2$ gem environment

RubyGems Environment:

  • RUBYGEMS VERSION: 1.8.25

  • RUBY VERSION: 1.9.2 (2012-04-20 patchlevel 320) [x86_64-darwin12.4.0]

  • INSTALLATION DIRECTORY: /Users/mselv2/.rvm/gems/ruby-1.9.2-p320

  • RUBY EXECUTABLE: /Users/mselv2/.rvm/rubies/ruby-1.9.2-p320/bin/ruby

  • EXECUTABLE DIRECTORY: /Users/mselv2/.rvm/gems/ruby-1.9.2-p320/bin

  • RUBYGEMS PLATFORMS:

  • ruby

  • x86_64-darwin-12

  • GEM PATHS:

  • /Users/mselv2/.rvm/gems/ruby-1.9.2-p320

  • /Users/mselv2/.rvm/gems/ruby-1.9.2-p320@global

  • GEM CONFIGURATION:

  • :update_sources => true

  • :verbose => true

  • :benchmark => false

  • :backtrace => false

  • :bulk_threshold => 1000

  • “gem” => “–no-rdoc --no-ri”

  • REMOTE SOURCES:

  • http://rubygems.org/

What problem are you seeing? gem environment is showing ruby 1.9.2 as expected. No-one can help unless you explain what your problem is.

Colin

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 …

Please let me know How to round the decimal value in ruby …?

Thanks .

Muthu Selvan SR

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

Is this really not apparent what the error is?

"Could not find RubyGem cucumber"

Try installing cucumber.