2016-11-01 1 views
0

Aucune de mes commandes ruby ​​ne fonctionne. A l'origine, j'essayais de faire fonctionner la boussole avec Grunt dans le cadre d'un projet généré par des yeoman, mais d'une manière ou d'une autre, j'ai tout chamboulé sur mon ordinateur.`raw_require_paths ': NotImplementedError (NotImplementedError)

C'est un mac plus ancien, dont je ne peux pas mettre à jour le système d'exploitation au-delà de 10.6.8. (Léopard des neiges)

Ruby -v: ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin10.0]

Si je tape une commande gem je reçois le texte suivant:

Users/home/.rbenv/versions/2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/basic_specification.rb:219:in `raw_require_paths': NotImplementedError (NotImplementedError) 
from /Users/home/.rbenv/versions/2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/basic_specification.rb:240:in `require_paths' 
from /Users/home/.rbenv/versions/2.1.3/lib/ruby/site_ruby/2.1.0/rubygems.rb:1098:in `register_default_spec' 
from /Users/home/.rbenv/versions/2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:773:in `block in load_defaults' 
from /Users/home/.rbenv/versions/2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:738:in `block in each_spec' 
from /Users/home/.rbenv/versions/2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:723:in `block (2 levels) in each_gemspec' 
from /Users/home/.rbenv/versions/2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:722:in `each' 
from /Users/home/.rbenv/versions/2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:722:in `block in each_gemspec' 
from /Users/home/.rbenv/versions/2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:721:in `each' 
from /Users/home/.rbenv/versions/2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:721:in `each_gemspec' 
from /Users/home/.rbenv/versions/2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:736:in `each_spec' 
from /Users/home/.rbenv/versions/2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:770:in `load_defaults' 
from /Users/home/.rbenv/versions/2.1.3/lib/ruby/site_ruby/2.1.0/rubygems.rb:1239:in `<top (required)>' 
from <internal:gem_prelude>:1:in `require' 
from <internal:gem_prelude>:1:in `<compiled>' 

Mon .bash_profile ressemble à ceci:

export PATH=/usr/local/bin:$PATH 
alias ll="ls -lahG" 
export NODE_PATH="/usr/local/lib/node" 
export PATH="/usr/local/share/npm/bin:$PATH" 
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH" 
#export PATH=/bin:/usr/bin:"$PATH" 
export PATH="/usr/local/mysql/bin:$PATH" 
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session. 
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" #Load RVM function 
if [ -f ~/.git-completion.bash ]; then 
source ~/.git-completion.bash 
fi 
eval "$(rbenv init -)" 


## 
# Your previous /Users/home/.bash_profile file was backed up as /Users/home/.bash_profile.macports-saved_2016-10-31_at_23:29:59 
## 

# MacPorts Installer addition on 2016-10-31_at_23:29:59: adding an appropriate PATH variable for use with MacPorts. 
export PATH="/opt/local/bin:/opt/local/sbin:$PATH" 
# Finished adapting your PATH environment variable for use with MacPorts. 

Répondre

0

Je l'ai fixé en suivant partiellement ces instructions à partir d'ici How to upgrade ruby and rails in mac os snow leopard

RVM (Ruby Version Manager) est la norme pour la mise à niveau Ruby Installation sur OSX: https://rvm.io (toute plate-forme - Y compris OSX neige Leopard)

Pour commencer, ouvrez une fenêtre de terminal et exécutez la suivante commande:

\curl -L https://get.rvm.io | bash -s stable --ruby

J'ai alors eu un avertissement que je devais utiliser rvm cleanup all avec the --auto-dotfiles drapeau Je puis rvm use [email protected] à une installation précédente qui a fonctionné.