#1
  1. A Change of Season
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    3,536
    Rep Power
    221

    Installing Laravel


    Hi

    I can install a copy Laravel with composer all good
    Code:
    composer create-project --prefer-dist laravel/laravel blog


    However, using
    Code:
    laravel new blog
    Gives me
    Code:
    -bash: laravel: command not found
    Before that I do
    Code:
    composer global require "laravel/installer"
    Changed current directory to /Users/****/.composer
    Using version ^2.0 for laravel/installer
    ./composer.json has been updated
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Nothing to install or update
    Generating autoload files


    The docs say
    Make sure to place composer's system-wide vendor bin directory in your $PATH so the laravel executable can be located by your system. This directory exists in different locations based on your operating system; however, some common locations include: macOS: $HOME/.composer/vendor/bin
    What is $PATH and how can I fix it?

    My composer is already in
    /usr/local/bin/composer
    No matter what location when I just execute composer I see it works and shows the help commands.

    I also tried this:

    vim ~/.bashrc
    Code:
    export PATH="$HOME/.composer/vendor/bin:$PATH"
    Thanks
    Last edited by English Breakfast Tea; February 27th, 2018 at 09:07 AM.
  2. #2
  3. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2003
    Location
    in da kitchen ...
    Posts
    12,871
    Rep Power
    6466
    at a guess I'd try
    [/code]laravel/laravel new blog[/code]
    --Ax
    without exception, there is no rule ...
    Handmade Irish Jewellery
    Targeted Advertising Cookie Optout (TACO) extension for Firefox
    The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones


    09 F9 11 02
    9D 74 E3 5B
    D8 41 56 C5
    63 56 88 C0
    Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.
    -- Jamie Zawinski
    Detavil - the devil is in the detail, allegedly, and I use the term advisedly, allegedly ... oh, no, wait I did ...
    BIT COINS ANYONE
  4. #3
  5. A Change of Season
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    3,536
    Rep Power
    221
    Originally Posted by Axweildr
    at a guess I'd try
    [/code]laravel/laravel new blog[/code]
    -bash: laravel/laravel: No such file or directory
  6. #4
  7. Wiser? Not exactly.
    Devshed God 2nd Plane (6000 - 6499 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    6,264
    Rep Power
    4193
    Your edit to .bashrc should take care of adding the folder to your PATH, but you may need to logout and login again before the change will be picked up.

    Temporarily, you can just execute that line in your terminal. That will setup the path for that terminal session.
    Recycle your old CD's



    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud
  8. #5
  9. A Change of Season
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    3,536
    Rep Power
    221
    Originally Posted by kicken
    Your edit to .bashrc should take care of adding the folder to your PATH, but you may need to logout and login again before the change will be picked up.
    This didn't do it. I logged out of terminal and logged back in and still get command not found.

    Originally Posted by kicken
    Temporarily, you can just execute that line in your terminal. That will setup the path for that terminal session.
    This worked. I just did this in terminal
    Code:
    export PATH="$HOME/.composer/vendor/bin:$PATH"

IMN logo majestic logo threadwatch logo seochat tools logo