2014-09-05 63 views
3

因此,我安装的鱼哦,我的鱼,当我想用​​RVM我得到这个错误:鱼RVM使用错误

➜ avalancha git:(services) ✗ rvm use 2.1.0 

Using /home/matias/.rvm/gems/ruby-2.1.0 
fish: The '$' character begins a variable name. The character '{', which directly followed a '$', is not allowed as a part of a variable name, and variable names may not be zero characters long. To learn more about variable expansion in fish, type 'help expand-variable'. 
/home/matias/.config/fish/functions/rvm.fish (line 2): begin; set -xg rvm_bin_path "/home/matias/.rvm/bin" ; set -xg GEM_HOME "/home/matias/.rvm/gems/ruby-2.1.0" ; set -xg XDG_SESSION_PATH "/org/freedesktop/DisplayManager/Session0" ; set -xg rvm_path "/home/matias/.rvm" ; set -xg XDG_SEAT_PATH "/org/freedesktop/DisplayManager/Seat0" ; set -xg DEFAULTS_PATH "/usr/share/gconf/ubuntu.default.path" ; set -xg rvm_prefix "/home/matias" ; set -xg PATH "/home/matias/.rvm/gems/ruby-2.1.0/bin" "/home/matias/.rvm/gems/[email protected]/bin" "/home/matias/.rvm/rubies/ruby-2.1.0/bin" "/home/matias/.rvm/bin" "/usr/local/sbin" "/usr/local/bin" "/usr/sbin" "/usr/bin" "/sbin" "/bin" "/usr/games" "/usr/local/games" ; set -xg MANDATORY_PATH "/usr/share/gconf/ubuntu.mandatory.path" ; set -xg rvm_version "1.25.29 stable" ; set -xg rvm_ruby_string "ruby-2.1.0" ; set -xg GEM_PATH "/home/matias/.rvm/gems/ruby-2.1.0" "/home/matias/.rvm/gems/[email protected]" ; set -xg rvm_delete_flag "0" ; set -xg rvm_debug " { ((${rvm_debug_flag:-0})) || return 0;" ; ;end eval2_inner <&3 3<&- 
                                                                                                                                                                                                                                                            ^
in . (source) call of file '-', 
    called on line 22 of file '/home/matias/.config/fish/functions/rvm.fish', 

in function 'rvm', 
    called on standard input, 
    with parameter list 'use 2.1.0' 

.: Error while reading file '-' 

有谁知道什么会是什么?

+0

[Fish shell和rvm - 允许登录shell]可能的重复(http://stackoverflow.com/questions/18824764/fish-shell-and-rvm-allowing-login-shell) – 2014-09-05 21:39:38

+0

不,我已经添加了用于RVM的鱼集成功能。这并不是要我用bash登录。 – 2014-09-05 21:42:42

+0

看起来他们修改了rvm_debug标志的设置方式,并未修改在env设置中用鱼语法替换所有bash语法的sed调用。这可能需要打开作为rvm问题跟踪器 – deontologician 2014-09-10 19:19:41

回答

8

我有同样的问题。这是由rvm_debug变量的多行值导致的不兼容性。我修改了函数以完全忽略这个变量,只做了一些小改动。

打开〜/的.config /鱼/功能/ rvm.fish,改变线7从这个:

and eval (grep '^rvm\|^[^=]*PATH\|^GEM_HOME' $env_file | grep -v '_clr=' | sed '/^[^=]*PATH/s/:/" "/g; s/^/set -xg /; s/=/ "/; s/$/" ;/; s/(//; s/)//') 

到这一点:

and eval (grep '^rvm\|^[^=]*PATH\|^GEM_HOME' $env_file | grep -v '_clr=' | grep -v 'rvm_debug=' | sed '/^[^=]*PATH/s/:/" "/g; s/^/set -xg /; s/=/ "/; s/$/" ;/; s/(//; s/)//') 

我不知道什么rvm_debug正在使用,但我的系统似乎没有它的工作。

+0

它的工作,谢谢! – 2014-09-15 13:21:45