Ruby PATH 未正确设置 [英] Ruby PATH is not correctly set up

查看:54
本文介绍了Ruby PATH 未正确设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,所以我让 Ruby 完美运行以使用 guard 来观看一些 sass 文件,我重新启动了我的电脑,苹果做了一些更新(不知道这是否与问题有关).重新启动后,我重新打开防护,但收到此错误:

OK so I had Ruby working perfectly to use guard to watch some sass files, I restarted my computer, apple did some updates (no idea if this is related to the problem or not). Once it had rebooted, I went to switch guard back on, and I get this error:

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:212: warning: Insecure world writable dir /usr/local/ImageMagick/bin in PATH, mode 040757

现在很明显的一件事是我路径中间的Imagemagick",我不知道它是如何到达那里的,而且很确定那是我的问题.

Now the one thing that is pretty obvious is the 'Imagemagick' in the middle of my path, I have no idea how that got there, and fairly sure thats my problem.

当我尝试在 Ruby 中运行大多数东西时,我得到了这个:

When I try and run most things in Ruby I get this :

PATH is not properly set up, '/usr/local/rvm/gems/ruby-1.9.3-p448/bin' is not available,
     usually this is caused by shell initialization files - check them for 'PATH=...' entries,
     it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
     to fix temporarily in this shell session run: 'rvm use ruby-1.9.3-p448'.

rvm get stable --auto-dotfiles 似乎对我没有任何作用.运行 rvm info 给我这个路径:

rvm get stable --auto-dotfiles doesnt seem to do anything for me. Running rvm info gives me this for the path:

    PATH:         "/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/ImageMagick/bin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin:/usr/local/rvm/bin"

只想知道我如何修复这条路径或任何可以解决我的问题的方法,我觉得我已经绕圈子太久了.

Just want to know how I can fix this path or anything that will sort my problems, I feel like I've been going round in circles for too long now.

谢谢

推荐答案

我在 OSX Mavericks 上遇到了同样的问题.对我有用的解决方案是将 rvm 路径添加到 ~/.bash_profile 文件中的 PATH 环境变量.就我而言,我没有在系统范围内安装 rvm,因此以下条目对我有用.

I had the same issue on OSX Mavericks. The solution that worked for me was to add the rvm path to the PATH environment variable in ~/.bash_profile file. In my case, I did not have a system wide installation of rvm, so the following entry worked for me.

PATH=/usr/local/bin:$HOME/.rvm/bin:$PATH

这篇关于Ruby PATH 未正确设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆