2012-06-17 28 views
1

當我嘗試使用'cake'命令時,我總是收到此錯誤。它似乎與CoffeeScript有衝突。CakePHP:與CoffeeScript衝突的Cakefile

/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 

我該如何解決這個問題?

+0

謝謝,但我不知道如何改變它? –

+0

好的,我在bashrc中添加了PATH,重新加載了bashrc,但它不起作用。現在我將CoffeeScript中的「蛋糕」命令改爲「蛋糕」,現在它完美運行,但我不認爲這是正確的解決方案。有什麼建議麼? –

+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 

這給了shellphp cake shell命令優先於coffescript之一。

乾杯!

+0

謝謝,我喜歡這個解決方案比上面更好! –

+0

解決我的問題!謝謝! –