Mac Lion上的yiic不会生成webapp

时间:2012-04-30 04:43:22

标签: macos yii osx-lion

我已将Mac Lion设置为我的开发机器。我没有使用MAMP,一切运行顺利。我已经满足了yii的要求,一切都很好。现在我正在尝试使用yiic创建我的第一个webapp。当我按照这里的说明http://www.yiiframework.com/doc/guide/1.1/en/quickstart.first-app终端告诉我它有mkdir一堆目录并且我的webapp已成功创建。

但是testdrive目录不在正确的目录(或任何目录)

有没有人碰到这个?是的,yiic文件和框架目录具有执行权限。

非常感谢任何帮助。

布伦特

1 个答案:

答案 0 :(得分:2)

您链接的代码在Lion上完美运行。你确定你是在正确的地方做的吗?

~/Sites/yii/$> ls ../foo
ls: ../foo: No such file or directory
~/Sites/yii/$> ./framework/yiic webapp ../foo
Create a Web application under '/Users/xcode/Sites/foo'? [Yes|No] yes
      mkdir /Users/xcode/Sites/foo
      mkdir /Users/xcode/Sites/foo/assets
      mkdir /Users/xcode/Sites/foo/css
   generate css/bg.gif
   generate css/form.css
   generate css/ie.css
   generate css/main.css
   generate css/print.css
   generate css/screen.css
      mkdir /Users/xcode/Sites/foo/images
   generate index-test.php
   generate index.php
      mkdir /Users/xcode/Sites/foo/protected
   generate protected/.htaccess
      mkdir /Users/xcode/Sites/foo/protected/commands
      mkdir /Users/xcode/Sites/foo/protected/commands/shell
      mkdir /Users/xcode/Sites/foo/protected/components
   generate protected/components/Controller.php
   generate protected/components/UserIdentity.php
      mkdir /Users/xcode/Sites/foo/protected/config
   generate protected/config/console.php
   generate protected/config/main.php
   generate protected/config/test.php
      mkdir /Users/xcode/Sites/foo/protected/controllers
   generate protected/controllers/SiteController.php
      mkdir /Users/xcode/Sites/foo/protected/data
   generate protected/data/schema.mysql.sql
   generate protected/data/schema.sqlite.sql
   generate protected/data/testdrive.db
      mkdir /Users/xcode/Sites/foo/protected/extensions
      mkdir /Users/xcode/Sites/foo/protected/messages
      mkdir /Users/xcode/Sites/foo/protected/migrations
      mkdir /Users/xcode/Sites/foo/protected/models
   generate protected/models/ContactForm.php
   generate protected/models/LoginForm.php
      mkdir /Users/xcode/Sites/foo/protected/runtime
      mkdir /Users/xcode/Sites/foo/protected/tests
   generate protected/tests/bootstrap.php
      mkdir /Users/xcode/Sites/foo/protected/tests/fixtures
      mkdir /Users/xcode/Sites/foo/protected/tests/functional
   generate protected/tests/functional/SiteTest.php
   generate protected/tests/phpunit.xml
      mkdir /Users/xcode/Sites/foo/protected/tests/report
      mkdir /Users/xcode/Sites/foo/protected/tests/unit
   generate protected/tests/WebTestCase.php
      mkdir /Users/xcode/Sites/foo/protected/views
      mkdir /Users/xcode/Sites/foo/protected/views/layouts
   generate protected/views/layouts/column1.php
   generate protected/views/layouts/column2.php
   generate protected/views/layouts/main.php
      mkdir /Users/xcode/Sites/foo/protected/views/site
   generate protected/views/site/contact.php
   generate protected/views/site/error.php
   generate protected/views/site/index.php
   generate protected/views/site/login.php
      mkdir /Users/xcode/Sites/foo/protected/views/site/pages
   generate protected/views/site/pages/about.php
   generate protected/yiic
   generate protected/yiic.bat
   generate protected/yiic.php
      mkdir /Users/xcode/Sites/foo/themes
      mkdir /Users/xcode/Sites/foo/themes/classic
      mkdir /Users/xcode/Sites/foo/themes/classic/views
   generate themes/classic/views/.htaccess
      mkdir /Users/xcode/Sites/foo/themes/classic/views/layouts
      mkdir /Users/xcode/Sites/foo/themes/classic/views/site
      mkdir /Users/xcode/Sites/foo/themes/classic/views/system

Your application has been created successfully under /Users/xcode/Sites/foo.
~/Sites/yii/$> ls ../foo
assets         css            images         index-test.php index.php      protected          
themes

注意,在我启用系统偏好设置 - >时,我的网站是Lion搜索主页的默认目录。分享 - >网络共享。