The destruction of the pearl?

I ran into a problem that I had never encountered before. The next day, when I went into my ruby ​​project, which is located in Sinatra, and went to install the package, I received this error:

/Users/me/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:762:in `report_activate_error': Could not find RubyGem bundler (>= 0) (Gem::LoadError) 

Odd I thought and went on typing

 gem list 

and there I saw:

 bundler (1.0.21, 1.0.2) 

So there is a bundle. Then, trying to remove the packer and reinstalling, switching ruby ​​-v to rvm, I tried to launch any other gem that I have, for example, rails. So I used rails s and bam, I got the same error as with bundler:

  /Users/me/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:762:in`report_activate_error': Could not find RubyGem rails (>= 0) (Gem::LoadError) 

What's happening? Then I tried the same thing with all my gems, and all this gives the same error. Is this something related to rvm? It seems I can’t repeat something unusual in the last couple of days that could have caused this. The only thing I did was switch to ZShell with Oh My ZSH, but that could have nothing to do with it. What is the problem? Should I remove rvm and reinstall it and then add ruby ​​-v, am I again? My environment is Mac OS X Lion. Thanks in advance.

EDIT:

Now I got it to roll. My switch to my zsh was really what caused the problem. Among the places where I found the answer was here: stack overflow

Basically what you need to do is yours

 ~/.zshrc 

Add this line:

 [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" 

Which loads rvm into a shell session. The problem is solved! Thanks to Felix Rabe for pointing me in the right direction.

+4
source share
2 answers

Your use of "Oh my ZSH" with RVM may be the reason. I googled for zsh rvm and found http://beginrescueend.com/integration/zsh where it says below:

If you want to use oh my zsh, be sure to use the bundler package. If rvm has to take care of everything, what would it do for you anyway.

(Copied from my comment above to get the answer "acceptable.")

+3
source

I fixed it differently.

My ~/.zshrc now has this line for plugins, and it solved the problems I had:

plugins=(git bundler brew git osx ruby zsh-syntax-highlighting)

This is similar to the configuration Ryan Bates uses: http://railscasts.com/episodes/308-oh-my-zsh

0
source

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


All Articles