Ruby 路径设置不正确

2024-04-12

好的,我让 Ruby 完美地工作,可以使用 Guard 来观看一些 sass 文件,我重新启动了计算机,苹果做了一些更新(不知道这是否与问题有关)。重新启动后,我重新打开防护装置,然后收到此错误:

/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”,我不知道它是如何到达那里的,并且相当肯定这就是我的问题。

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

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给我这个路径:

    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"

只是想知道如何解决这条道路或任何可以解决我的问题的方法,我觉得我已经兜圈子太久了。

Thanks


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

PATH=/usr/local/bin:$HOME/.rvm/bin:$PATH
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Ruby 路径设置不正确 的相关文章

随机推荐