Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Oil create doesn't work?
  • Very basic problem: According to the docs, I create a new project by simply doing "oil create projectname", but when I do that, I just get the oil help screen. Does the create command no longer exist? What is the correct way to start a new project?
  • So there are two different oil scripts. There is the one you install to your bin which is done when you use the one-line installer, and the one that comes packaged with Fuel in your application. The first is streamline and does two things: 1. Allow you to create new apps by doing a git clone into the path you mention and running the install task
    2. Alias "php oil" to "oil" If you don't use the one-liner, mess with your bins or upgrade your OS then the streamline/bash version of oil could screw up.
  • I've got the same problem. Downloaded FuelPHP into my web root. Then ran the command line installer. Regardless of whether I run "oil create myproject" or "php oil create myproject", I just get the default help page for oil, which contains no reference to the "create" command. The documentation also doesn't cover "create" at all, only talks about "generate", which isn't the same thing as far as I can tell. So we didn't get out of the starting gates here, which is very disappointing after all the hype about this framework. I'm putting Fatfree, Vork and Code-Ignitor through tests at the minute and was hoping to add Fuel into the mix. I don't know what other information I can give you, there's no error or anything, nothing in the apache or php error logs, it just doesn't seem to recognise "create" and it's not documented. So, Phil, I think we should be asking you, "more information please!" :-)
  • I just gave you all the information you could possibly need in the previous post... So, where did you read about "oil create"? Was it on the homepage of the documentation right where it says:
    # quick install oil from the web
    $ curl get.fuelphp.com/oil | sh
    # now that oil is installed, create a blog project in a directory called Sites
    $ cd Sites/
    $ oil create blog
    

    If you only did the second half of the two-stage process then it wont work, which is somewhat like trying to go through a door without opening it.
  • It also doesn't work if you do the first AND the second bit, i.e. download and install manually, and then try to run 'oil create'...
  • When you run the one-liner it will put it into your bin directory. If that doesn't work you should get an error of some description. Try "which oil" From what was described above noeldc was skipping step 1 and not installing the bash script.
  • Nope. He wrote "Downloaded FuelPHP", "then ran the installer". That doesn't work, that would run 'oil' the CLI, not 'oil' the installer, which explains the help page, as the CLI version doesn't know the command 'create'. I think he was on IRC this morning with the same issue...
  • That was essentially the problem that I had when I first started this thread a few months ago. When you first dive into FuelPHP and start with the quick-install steps on http://docs.fuelphp.com/, it's not clear that there are different versions of Oil that do different things. If a user decides to download Fuel and unpack it manually rather than run the shell script, he/she may believe (as I did) that he is now ready to "oil create blog". But it don't work that way. As Phil replied, there are two different Oils. Probably a good opportunity for doc clarification.
  • Hello, this is my first post here. I just have to say that there needs to be written instructions on how to setup oil (full working version) on windows ex. xampp. There are few issues with that curl command because CURL is not installed by default and you can't get oil to install. I even don't know why there are two version of oil or why in download package (with browsers, not git) there isn't "full version" of oil. I can't say that I'm rookie in MVC and frameworks but I just can't get it to install, but I wont bother with it either, I'll just create directories by hand for now.
  • Welcome here. There is only one version of oil, which is in the root of your fuelphp installation. For *nix operating systems there's a shell script that installs in the /usr/bin folder that allows you to run oil without prefixing it with the php binary, and uses cURL to download FuelPHP if you use the create option. This requires *nix specific features that can not be easily recreated on Windows. For Windows you'll have to follow the manual installation instructions in the documentation. All other oil functionality is available after you installed it, by using "<path to php>\php.exe oil ....".
  • Works fine for me, I used it yesterday. More information please.
  • Actually, mine did this too after I updated to Lion, it said git not found... which is an odd error because I had git aliased... After I spent a bit of time on it I figured out Lion had changed the permissions on my ~/.bash_profile and it wasn't loading my aliases, but because at some point I had switched .bash_rc git loaded find when I typed it in myself. I don't see how this could be possible, but changing the permissions on my .bash_profile file got oil working again Not sure if you're on Lion or not, if so try that.

Howdy, Stranger!

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

In this Discussion