2014-10-09 60 views
0

该帮助有一个不同的选项负载。我想:如何安装Laravel

composer global require "laravel/installer=~1.1" 

返回:

 [RuntimeException] 
    Not enough arguments. 

再有就是坐落在文章引用Windows安装程序的负载:

http://laravel.com/laravel.phar

它说: “哎呦,看起来像是出了问题。“

我不确定还有什么可以尝试的?我错过了什么吗?

回答

0

这应该有工作,也许波浪需要逃避您的shell(\~),或者你可以尝试由命令接受其他格式之一:

Usage: 
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [packages1] ... [packagesN] 

Arguments: 
packages     Required package with a version constraint, e.g. foo/bar:1.0.0 or foo/bar=1.0.0 or "foo/bar 1.0.0" 
0

这里u能看到安装说明: http://laravel.com/docs/4.2/installation

它归结为:

  1. 安装作曲家
  2. 下载laravel
  3. 放入WAMP的WWW文件夹,以便你有WWW/laravel主
  4. 在laravel掌握和选择作曲家的根源右键单击安装
  5. 蓄势待发

我假设你使用WAMP,如果你使用别的东西,把laravel放在你所有项目所在的地图上。

0

如果您使用的是MAMP,则此youtubevideo将有所帮助。它的确帮助了我,尽管我最终承认它并不像我希望的那样清晰。

无论如何,我做了我自己的笔记,以防万一我必须再次做。

a。 MAMPPHP到PATH变量的.bash_profile

export PATH=/Applications/MAMP/bin/php/php5.5.10/bin:$PATH 

也许不是必要的步骤,如果你有一个更新的phpmcrypt,我只是选择使用MAMP“加s php

湾安装Composerhttp://www.getcomposer.org/ - >入门 - >全局复制和执行两个命令, 在终端...

cd ~ 
curl -sS https:/?getcomposer.org/installer | php 
sudo mv composer.phar /usr/local/bin/composer 

℃。在使用composer, 在终端MAMP/htdocs文件夹中安装Laravel ...

cd /Applications/MAMP/htdocs 
composer create-project laravel/laravel neji --prefer-dist 

**其中宁次是你的网站/项目

d的名字。编辑/private/etc/hosts

sudo nano /private/etc/hosts 
add 127.0.0.1 neji 

e。使用任何文本编辑编辑/Applications/MAMP/conf/apache/httpd.conf 取消注释通过移除#之前包括......在虚拟主机,见下文哪里...

# Virtual Hosts 
#Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf 

成为...

# Virtual Hosts 
Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf 

F。使用任何文本编辑编辑/Applications/MAMP/conf/apache/extra/httpd-vhosts.conf 底部

# I am not sure about this since DocumentRoot does not points to the public folder 
# but I still added it and it's working, maybe someone will clarify this part 
<VirtualHost *:80> 
    ServerAdmin localhost 
    DocumentRoot "/Applications/MAMP/htdocs" 
    ServerName localhost 
    ServerAlias www.localhost 
#  ErrorLog "logs/dummy-host.example.com-error_log" 
#  CustomLog "logs/dummy-host.example.com-access_log" common 
</VirtualHost> 

# this one, I think is the code that makes it work bec the DocumentRoot points to public folder 
<VirtualHost *:80> 
    ServerAdmin neji.dev 
    DocumentRoot "/Applications/MAMP/htdocs/neji/public/" 
    ServerName neji.dev 
    ServerAlias www.neji 
#  ErrorLog "logs/dummy-host.example.com-error_log" 
#  CustomLog "logs/dummy-host.example.com-access_log" common 
</VirtualHost> 

** 2东西添加下面的文本注意 1组服务器名称到您的项目名称(neji.dev) 2.设置DocumentRoot的公用文件夹g。

g。用你喜欢的浏览器中打开你的项目

neji.dev/ 

**不会在年底

你应该看到laravel欢迎页面忘记/

然后几天后切换到​​:)

+0

对不起伙计我才意识到你正在使用Windows – kofi 2014-10-10 02:01:18