新手问题 关于 Ruby interpreter

modacker · 2014年03月01日 · 最后由 modacker 回复于 2014年03月05日 · 3989 次阅读
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 <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [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而已啊!!谁来救救我???

共收到 4 条回复

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

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

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

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

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