CakePHP:Cakefile与CoffeeScript冲突

时间:2012-06-17 05:20:05

标签: shell cakephp cakephp-1.3 coffeescript

当我尝试使用'cake'命令时,我总是收到此错误。它似乎与CoffeeScript发生冲突。

/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:108
throw new Error("Cakefile not found in " + (process.cwd()));
      ^
Error: Cakefile not found in /Users/kevingorjan/e-Merce/Learning/CakePHP/Blog_demo/lib/Cake/Console
at /usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:108:11
at /usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:106:14
at /usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:106:14
at /usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:106:14
at /usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:106:14
at /usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:106:14
at /usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:106:14
at /usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:106:14
at /usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:106:14
at /usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:106:14

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:3)

$ vi .bash_profile

我的路径中有节点和coffeescript以及各种各样的东西。我的.bash_profile中包含以下几行:

#Path
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/share/npm/bin:$PATH"

当我把蛋糕的东西添加到我的路径时,就像他们建议的那样http://book.cakephp.org/2.0/en/console-and-shells.html#adding-cake-to-your-path我得到了同样的错误:

#Path
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/share/npm/bin:$PATH"

export PATH="$PATH:/Users/eO_Ae/cakephp/lib/Cake/Console"

我采取的措施是:

# Cake PHP
PATH="/Users/eO_Ae/cakephp/lib/Cake/Console:$PATH"

# Path
PATH="$PATH:/usr/local/bin:/usr/local/sbin:~/bin:/usr/local/share/npm/bin"

export PATH

这使得cakephp cake shell命令优先于coffescript。

干杯!