【问题标题】:Cloud9 IDE [C9 Server Exception 2] undefinedCloud9 IDE [C9 服务器异常 2] 未定义
【发布时间】:2015-04-07 06:18:21
【问题描述】:

我们已经在 ubuntu 12.04LTS 32bit 服务器上本地安装了 cloud9 ide。安装步骤遵循 url http://ubuntuforums.org/showthread.php?t=1813076 Cloud9 IDE 正在运行并且能够看到主页 ( localhost:3131/ ) 当我们尝试运行 php 或 python 文件时,在控制台窗口上会显示一条消息“[C9 Server Exception 2] undefined”

对 localhost:3131/debug 的请求也会抛出“404 Not Found” 后参数如下, {"agent":"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0","type":"C9 SERVER EXCEPTION","message":{"type":"error","message":"文件不存在:root/local/bin/node","code":2,"data" :{"command":"Run","file":"root/local/bin/node","runner":"node","args":[""],"env":{"C9_SELECTED_FILE" :""}}}}

如何解决这个问题?

【问题讨论】:

  • 服务器上好像没有安装node。你能用sudo apt-get install nodejs安装它吗?
  • nodejs和node安装完毕,root@local:~# which nodejs /usr/bin/nodejs root@local:~# nodejs -v v0.10.38 root@local:~# which node /root /local/bin/node root@local:~# node -v v0.4.10
  • 如果您使用sudo apt-get install node 安装了节点,则必须将其删除。这可能就是您遇到此问题的原因。使用 sudo apt-get install nodejs 删除节点二进制文件并再次安装节点

标签: cloud9-ide


【解决方案1】:

http://ubuntuforums.org/showthread.php?t=1813076 中的安装步骤适用于旧版本。

安装

按照以下步骤安装 SDK:

git clone git://github.com/c9/core.git c9sdk
cd c9sdk
scripts/install-sdk.sh

要将 SDK 更新到最新版本,请运行:

git pull origin master
scripts/install-sdk.sh

请注意,Cloud9 v3 当前需要 Node.js 0.12 或 0.10。

启动 Cloud9

如下启动Cloud9:

node server.js

可以使用以下选项:

--settings       Settings file to use
--help           Show command line options.
-t               Start in test mode
-k               Kill tmux server in test mode
-b               Start the bridge server - to receive commands from the cli  [default: false]
-w               Workspace directory
--port           Port
--debug          Turn debugging on
--listen         IP address of the server
--readonly       Run in read only mode
--packed         Whether to use the packed version.
--auth           Basic Auth username:password
--collab         Whether to enable collab.
--no-cache       Don't use the cached version of CSS

现在访问http://localhost:8181/ide.html加载Cloud9。

运行测试

运行服务器端测试:

npm run test

运行客户端测试:

npm run ctest

然后在浏览器中访问http://localhost:8181/static/test

更多详情请见:https://github.com/c9/core#installation

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多