Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Github & Fuel Issues for new projects created from Oil
  • I'm trying to setup my deployment scripts with fuel and git, but I'm running into some issues, and I think it may be related to the submodules in the git repo that's created when you run "oil create {sitename}" from the command line. Here's what I'm doing: In my web folder, I run "oil create testapp1". Oil does its thing (which is awesome) and creates the app. If I go to [url=http://localhost/testapp1/public/]http://localhost/testapp1/public/[/url] the default Fuel welcome page is displayed. I go to github.com to create a repo for my new project. Then I go back to my machine's command line and try to "git init" my testapp1 folder and receive the following message: "Reinitialized existing Git repository in ~/Sites/testapp1/.git/" Since there's already an origin set for testapp1, I have to remove the old origin and add my github origin:
    "git origin -v" - display the origin
    origin git://github.com/fuel/fuel.git (fetch)
    origin git://github.com/fuel/fuel.git (push)
    "git remote rm origin" - remove the origin
    "git remote add origin git@github.com:chadhutchins/testapp1" - adds the new origin And finally, I push things: "git push -u origin master" Remember [url=http://localhost/testapp1/public/]http://localhost/testapp1/public/[/url] works just fine. Everything seems good at this point, but if I clone my repo, "git clone git@github.com:chadhutchins/testapp1.git testapp2" into my webfolder, If I go to [url=http://localhost/testapp2/public/]http://localhost/testapp2/public/[/url] I get 1 php warning and 1 php error: "Warning: require_once(/Users/chadhutchins/Sites/testapp2/fuel/core/bootstrap.php) [function.require-once]: failed to open stream: No such file or directory in /Users/chadhutchins/Sites/testapp2/fuel/app/bootstrap.php on line 4" "Fatal error: require_once() [function.require]: Failed opening required '/Users/chadhutchins/Sites/testapp2/fuel/core/bootstrap.php' (include_path='.:') in /Users/chadhutchins/Sites/testapp2/fuel/app/bootstrap.php on line 4" bootstrap.php does exist, it's like the permissions are getting changed or something. Does anyone have any ideas? I've spent a lot of time on this, and I'm guessing it's something stupid I'm overlooking.
  • Thanks to a good friend, @jonhinson, he pointed at that all I needed was a --recursive flag in my clone command: git clone --recursive git@github.com:chadhutchins/testapp1.git So... to use fuelphp, github and oil, here are the steps: 1) Create your app with the oil utility in your web folder:
    oil create [app]
    

    2) Make sure the app works in your browser: localhost/[app]/public - The default fuelphp welcome page should show up.
    
    
    3) Goto github.com and create a new repo on your account
    
    
    4) Go back to your local code and run the following in your [app] folder:
    git init
    

    5) Since the remote origin is already set to the fuel github account, you have to remove the remote origin and add your own:
    git remote rm origin
    
    git remote add origin git@github.com:[username]/[repo].git
    

    6) Now push the code:
    git push -u origin master
    

    7) At this point everything is setup. Now whenever you want to clone the repo for another development machine, be sure to use the recursive flag when cloning. This tells your repo not just to pull your latest code, but also the code from the submodules (such as the fuelphp core code and docs):
    git clone --recursive git@github.com:[username]/[repo].git
    

  • Also... the --recursive flag is only available in git 1.6.5 and above. If you are on a previous version, you'd have to do something like this:
    git clone git@github.com:[username]/[repo].git
    cd [repo]
    git submodule update --init
    

Howdy, Stranger!

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

In this Discussion