新手问题 关于 Ruby interpreter

modacker · 2014年03月01日 · 最后由 modacker 回复于 2014年03月05日 · 4876 次阅读
Last login: Sat Mar  1 00:14:05 2014 from *.*.*.*
Unknown ruby interpreter version (do not know how to handle): textmate.
Could not load ruby textmate.

一打开 shell,就看到如此鲜艳的大红色的报错。我真心看不懂是个啥玩意啊!

搜索引擎也翻遍了。

按照字面意思应该是 ruby 的问题,我是用 rvm 按照的 ruby,先用rvm info看看是个什么情况

$ rvm info

ruby-2.0.0-p451:

  system:
    uname:       "*"
    system:      "ubuntu/12.04/x86_64"
    bash:        "/bin/bash => GNU bash, version 4.2.24(1)-release (x86_64-pc-linux-gnu)"
    zsh:         " => not installed"

  rvm:
    version:      "rvm 1.25.19 (stable) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]"
    updated:      "1 day 1 hour 38 minutes 1 second ago"
    path:         "/home/wwwroot/.rvm"

  ruby:
    interpreter:  "ruby"
    version:      "2.0.0p451"
    date:         "2014-02-24"
    platform:     "x86_64-linux"
    patchlevel:   "2014-02-24 revision 45167"
    full_version: "ruby 2.0.0p451 (2014-02-24 revision 45167) [x86_64-linux]"

  homes:
    gem:          "/home/wwwroot/.rvm/gems/ruby-2.0.0-p451"
    ruby:         "/home/wwwroot/.rvm/rubies/ruby-2.0.0-p451"

  binaries:
    ruby:         "/home/wwwroot/.rvm/rubies/ruby-2.0.0-p451/bin/ruby"
    irb:          "/home/wwwroot/.rvm/rubies/ruby-2.0.0-p451/bin/irb"
    gem:          "/home/wwwroot/.rvm/rubies/ruby-2.0.0-p451/bin/gem"
    rake:         "/home/wwwroot/.rvm/gems/ruby-2.0.0-p451/bin/rake"

  environment:
    PATH:         "/home/wwwroot/.rvm/gems/ruby-2.0.0-p451/bin:/home/wwwroot/.rvm/gems/ruby-2.0.0-p451@global/bin:/home/wwwroot/.rvm/rubies/ruby-2.0.0-p451/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/wwwroot/.rvm/bin:/home/wwwroot/.rvm/bin"
    GEM_HOME:     "/home/wwwroot/.rvm/gems/ruby-2.0.0-p451"
    GEM_PATH:     "/home/wwwroot/.rvm/gems/ruby-2.0.0-p451:/home/wwwroot/.rvm/gems/ruby-2.0.0-p451@global"
    MY_RUBY_HOME: "/home/wwwroot/.rvm/rubies/ruby-2.0.0-p451"
    IRBRC:        "/home/wwwroot/.rvm/rubies/ruby-2.0.0-p451/.irbrc"
    RUBYOPT:      ""
    gemset:       ""

没有看到我指定了 textmate 来作为 ruby 解释器啊!!

$ rvm gemset list

gemsets for ruby-2.0.0-p451 (found in /home/wwwroot/.rvm/gems/ruby-2.0.0-p451)
=> (default)
   global

也不是 gemset 的问题啊!我今天一天没啥事情就动了一下 git 的 hooks,是不是 hooks 的问题呢?

$ cat $git-repo/project/hooks/post-receive
#!/bin/sh
unset GIT_DIR
NowPath=`pwd`
echo "now path is :"$NowPath
DeployPath="/home/wwwroot"
echo "deploy path is :"$DeployPath
cd $DeployPath
echo "cd deploy path"
git fetch origin
git pull
echo "deploy done"
cd $NowPath
echo "Successfull"

我今天总共也就改了这么一个文件啊!昨天还好好的,就是下班的时候在地铁上用手机登了一下 server,但是我也就运行了一个 irb 而已啊!!谁来救救我???

怎么感觉是有个应该写版本号的地方被写成了textmate 整个工程里搜一下 textmate 也许不小心写错了?...

可以再查查rvm alias list default 和你的 .bashrc .bash_profile 和 textmate 有关的配置

#2 楼 @leozwa 我都查过了,一台纯生产的服务器,刚刚配置好,而且又不是 mac 哪里来的 textmate…我后来估计着兴许是我改了 home 目录的 777 导致的…权限修改不能回滚,我就只好重新配置一遍了…

#2 楼 @leozwa 我 grep 过整个系统文件,找到几个有 textmate 的文件,都和 ruby 不搭界,甚至都是被注释掉的说明…

需要 登录 后方可回复, 如果你还没有账号请 注册新账号