我怎样才能设置“烘焙”?在 OS X 上使用 MAMP 并在“站点”中使用项目?

发布于 2024-08-17 16:26:24 字数 861 浏览 6 评论 0原文

我正在尝试在 OS X 上设置“蛋糕烘焙”。我正在使用 MAMP,每次尝试“烘焙”时,我都会得到以下信息:

-bash: cake: command not found

我有 Apress Beginning CakePHP 书,但那本书中的建议对我不起作用。 中建议了以下解决方案,

在 Apress 书中,他在 .profile alias cake="php ~/Sites/blog/cake/console/cake.php"

我还发现了一些其他建议: (在.profile中添加别名)

alias cake="/Applications/MAMP/bin/php5/bin/php /Users/fabian/Sites/miapp/cake/console/cake.php"

alias cake="/Applications/MAMP/ bin/php5/bin/php /Applications/MAMP/htdocs/cake/console/cake.php”

我也在终端中尝试过这个: /Applications/MAMP/bin/php5/bin/php ~/Sites/miapp/cake/console/cake.php 烘焙

...但这也不起作用。

我还尝试了此 YouTube 视频 http://www.youtube.com/watch 中的解决方案?v=KOBO-kEakQ0 ,但这也不起作用。

那么...我怎样才能在 OS X 上使用 MAMP 来“烘焙”我在“站点”中的项目呢?

干杯!

山姆

I'm trying to set up 'cake bake' on OS X. I'm using MAMP and every time I try to 'bake', I get this:

-bash: cake: command not found

I have the Apress Beginning CakePHP book, but the suggestions in that book aren't working for me. In the Apress, book, he suggests the following solution in .profile

alias cake="php ~/Sites/blog/cake/console/cake.php"

I've also found some other suggestions:
(put an alias in .profile)

alias cake="/Applications/MAMP/bin/php5/bin/php /Users/fabian/Sites/miapp/cake/console/cake.php"

alias cake="/Applications/MAMP/bin/php5/bin/php /Applications/MAMP/htdocs/cake/console/cake.php"

I've also tried this in terminal:
/Applications/MAMP/bin/php5/bin/php ~/Sites/miapp/cake/console/cake.php bake

...but this didn't work either.

I also tried the solution in this YouTube video http://www.youtube.com/watch?v=KOBO-kEakQ0 , but that didn't work either.

So...how could I get 'bake' working with MAMP on OS X with my projects in 'Sites'?

Cheers!

Sam

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

过度放纵 2024-08-24 16:26:24

不确定蛋糕烘焙是什么,但看起来它在您的路径上找不到蛋糕。在 .profile 中设置别名后,您是否发出:

source ~/.profile

更新其中的设置?

not sure what cake bake is, but it looks like it can't find cake on your path. After you set the alias in your .profile did you issue:

source ~/.profile

to update the settings in it?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文