Rvm, irb and require - do not work for installed stones under irb

I just installed rvm today and it looks really convenient / powerful.

I think I get it, but ...

When using rvm of installed ruby ​​and running irb, when I need installed pearl, something like rvm, I get:

> kimptoc$ rvm use 1.8.7
Using /Users/kimptoc/.rvm/gems/ruby-1.8.7-p302


> kimptoc$ gem list

*** LOCAL GEMS ***

abstract (1.0.0)
...
rvm (1.0.11)
...


> kimptoc$ irb
ruby-1.8.7-p302 > require 'rvm'
LoadError: no such file to load -- rvm
    from (irb):1:in `require'
    from (irb):1

But when using the "system" ruby, it works fine.

Historically, I used the installation of sudo gem ... and so the "system" stones are usually set that way. Maybe this is my problem? Do I need to remove them to correct the situation?

I am running OSX 10.6.4. "system" is the default OSX ruby, 1.8.7 (p174)

Thanks in advance for any tips / thoughts, Chris

+3
3

require 'rubygems'.

+10
> rvm use 1.8.7
> rvm info
     (Find the homes -> gem directory)
> ls -al ~/.rvm/gems/ruby-1.8.7   (Substitute your gem directory as needed)

?

, sudo gem install rvm - .

+1

Ruby 1.9.3 , rubygems, rvm.

.irbrc wirble awsome print, , , , "rubygems" "rvm"

if RUBY_VERSION > "1.8.7"
  require 'rvm'
else
  require 'rubygems'
end
require 'wirble'
Wirble.init
Wirble.colorize

rubygems, rvm , RVM rubygems .

+1

Source: https://habr.com/ru/post/1766018/


All Articles