Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Oil created doesn't work
  • Hi,
    how to create new project in Fuelphp 1.6.1? OIl hasn't got create parametr.
  • HarroHarro
    Accepted Answer
    oil create is not a command of the PHP frontloader, it's a feature of the bash script.

    So if you haven't done
    curl get.fuelphp.com/oil | sh
    you won't have that available
  • [code]root@www1:/var/www# cd
    root@www1:~# cd /var/www && ls
    CHANGELOG.md     README.md   composer.json  composer.phar  fuel  pma
    CONTRIBUTING.md  TESTING.md  composer.lock  docs           oil   public
    root@www1:/var/www# whereis oil
    oil: /usr/bin/oil /usr/bin/X11/oil
    root@www1:/var/www# rm /usr/bin/oil
    root@www1:/var/www# oil
    -bash: /usr/bin/oil: No such file or directory
    root@www1:/var/www# php oil create test

    Usage:
      php oil [cell|console|generate|package|refine|help|server|test]

    Runtime options:
      -f, [--force]    # Overwrite files that already exist
      -s, [--skip]     # Skip files that already exist
      -q, [--quiet]    # Supress status output
      -t, [--speak]    # Speak errors in a robot voice

    Description:
      The 'oil' command can be used in several ways to facilitate quick development, help with
      testing your application and for running Tasks.

    Environment:
      If you want to specify a specific environment oil has to run in, overload the environment
      variable on the commandline: FUEL_ENV=staging php oil <commands>

    Documentation:
    root@www1:/var/www# curl get.fuelphp.com/oil | sh
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   385  100   385    0     0   4001      0 --:--:-- --:--:-- --:--:--  5746
    root@www1:/var/www# oil create test

    Usage:
      php oil [cell|console|generate|package|refine|help|server|test]

    Runtime options:
      -f, [--force]    # Overwrite files that already exist
      -s, [--skip]     # Skip files that already exist
      -q, [--quiet]    # Supress status output
      -t, [--speak]    # Speak errors in a robot voice

    Description:
      The 'oil' command can be used in several ways to facilitate quick development, help with
      testing your application and for running Tasks.

    Environment:
      If you want to specify a specific environment oil has to run in, overload the environment
      variable on the commandline: FUEL_ENV=staging php oil <commands>

    Documentation:
    root@www1:/var/www#
    [/code]
    What is bad with it?
  • No need to quote everything. As I said, "create" is not implemented in the php frontloader, so "php oil" doesn't help you.

    The problem is

    root@www1:/var/www# oil
    -bash: /usr/bin/oil: No such file or directory

    which probably means it's not executable. see if a "chmod 775 /usr/bin/oil" (you probably have to be root for that) will fix the problem.
  • On second thought:

    If can also be that you try to do a 'oil create" from a folder that already has FuelPHP installed. In which case it refuses to do a create, and will start the frontloader instead. Which does not have a create method.
  • I've updated the package (in 1.7/develop) to capture the use of "oil create" inside an existing installation, and display an error message instead of just dumping the help...

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion