42
34

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Hello Laravel 5! しようとしたら一瞬つまづいた時の対応

Last updated at Posted at 2015-08-20

作業

http://laravel.com/docs/5.1/installation
をチラ見しながら、Laravel 5 をセットアップ。
composer global でゲシゲシやったのは省略。
で、サンドボックス用のアプリケーションを作成してみた。

laravel new laravel-sandbox
cd laravel-sandbox
php artisan serve

として、ローカルで立ち上げてアクセスすると、

Whoops, looks like something went wrong.

とか出てきてつらい。

原因は、ちゃんとインストールドキュメント読んでなかったからで、以下にちゃんと書いてあった。

To make this a cinch, Laravel utilizes the DotEnv PHP library by Vance Lucas.
In a fresh Laravel installation, the root directory of your application will contain a .env.example file.
If you install Laravel via Composer, this file will automatically be renamed to .env. Otherwise, you should rename the file manually.

なので、


cp -p .env.example .env
php artisan key:generate

を実行して解決。

結論

いけるやろと思ってもちゃんとドキュメント読め。

42
34
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
42
34

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?