user1592380
user1592380

Reputation: 36247

Twitter bootstrap not installing using composer in laravel 4

I am working on the following tutorial:

http://net.tutsplus.com/tutorials/javascript-ajax/combining-laravel-4-and-backbone/

following this my composer.json filehas the following:

{
  "require": {
    "laravel/framework": "4.0.*",
    "way/generators": "dev-master",
    "twitter/bootstrap": "dev-master",
    "conarwelsh/mustache-l4": "dev-master"
  },
  "require-dev": {
    "phpunit/phpunit": "3.7.*",
    "mockery/mockery": "0.7.*"
  },
  "autoload": {
    "classmap": [
      "app/commands",
      "app/controllers",
      "app/models",
      "app/database/migrations",
      "app/database/seeds",
      "app/tests/TestCase.php"
    ]
  },
  "scripts": {
    "post-update-cmd": "php artisan optimize"
  },
  "minimum-stability": "dev"
}

I run composer to install the dependencies

$ composer install --dev

If I then go into the vendor folder there is no twitter-bootstrap folder. ( The other dependencies appear to have been installed.

when I run update:

$ composer update --dev
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing symfony/console (2.3.x-dev 35da735)
- Installing symfony/console (2.3.x-dev 911cdac)
Downloading: 100%

Writing lock file
Generating autoload files
Generating optimized class loader
Compiling common classes

-- No errors, the bootstrap files are not in the vendor folder

Has anyone run into this problem. Is there any way to fix it?

Upvotes: 2

Views: 7210

Answers (3)

Arthur BALAGNE
Arthur BALAGNE

Reputation: 313

composer require "twitter/bootstrap":"*"
Worked fine for me

Upvotes: 9

Emeka Mbah
Emeka Mbah

Reputation: 17545

You need to update composer.phar

Run composer self-update to update composer.phar then after you need to run

composer update to install twitter bootstrap

Upvotes: 0

Andreas
Andreas

Reputation: 920

The above solution doesn't seem to work anymore, I had to add another package inside my composer.json which pointed to the existing bootstrap repository (https://github.com/twbs/bootstrap)

Below is a partial composer.json that works for me.

"repositories": [
    {
        "type": "package",
        "package": {
            "version": "3.0.0",
            "name": "twbs/bootstrap",
            "source": {
                "url": "https://github.com/twbs/bootstrap.git",
                "type": "git",
                "reference": "master"
            },
            "dist": {
                "url": "https://github.com/twbs/bootstrap/zipball/master",
                "type": "zip"
            }
        }
    }
],
"require": {
    "laravel/framework": "4.0.*",
    "twbs/bootstrap": "*"
},

Upvotes: 3

Related Questions