CodepadME / laravel-tricks

The source code for the Laravel Tricks website
http://laravel-tricks.com
MIT License
966 stars 298 forks source link

Whoops, looks like something went wrong. #66

Closed yuri25 closed 9 years ago

yuri25 commented 10 years ago

The installation was successful. When you open the site - this error: Whoops, looks like something went wrong.

Predis\Connection\ConnectionException …/­vendor/­predis/­predis/­lib/­Predis/­Connection/­AbstractConnection.php141

Predis \ Connection \ ConnectionException Connection refused [tcp://127.0.0.1:6379]

jjordansd commented 10 years ago

The error is saying it can't connect to your redis cache server. You can use the file cache driver (removing the need to connect to a redis server). Do this by updating the app/config/cache.php and comment update the driver to 'file': 'driver' => 'file', // 'driver' => 'redis',

If you want to use redis, you need to verify it is installed or on Mac OS X install it with: brew install redis-server

And start it with: redis-server

For redis cache, make sure the app/config/cache.php driver setting is set to: 'driver' => 'redis',

That should do it.

Jacques

yuri25 commented 10 years ago

Thank you, I had to comment out several mentions of redis in multiple files. Everything works. I do not understand how an administrator can add and edit categories ... generally have admin panel as such? The site developer is said here that there is admin panel

http://maxoffsky.com/maxoffsky-blog/announcing-release-laravel-tricks-com-source/

Admin panel for editing / creating tags and categories

But I did not find such opportunities, although logged as msurguy and password password. Please tell me how?

msurguy commented 10 years ago

The admin panel for editing tags / categories is at these URLs relative to the root:

/admin/tags /admin/categories

msurguy commented 10 years ago

It seems that your hostname is not defined in the bootstrap/start.php file and because of that the environment gets set as production and not local

yuri25 commented 10 years ago

Great, everything works. Thank you very much.

stigoleg commented 10 years ago

I have the same problem as @yuri25 had earlier. After installing the app, all I see is "Whoops, looks like something went wrong." I have tried to comment out 'driver' => 'redis', in both cache.php and session.php. Anyone that know how I can solve this?

stidges commented 10 years ago

@Posterum Try adding your hostname to the local aray in the bootstrap/start.php file. This should show you a more detailed error of what is going wrong

stigoleg commented 10 years ago

Thanks, but I have added it to the local array:

$env = $app->detectEnvironment(array( 'local' => array('sog.local'), ));

stidges commented 10 years ago

Is that your machine name? Since Laravel 4.1 it requires you to enter your machine name instead of the url of your app.

stigoleg commented 10 years ago

Ah, sorry my bad. Changed it to sog and everyting works :) Thansk for helping me! :)

koppenhoefer commented 7 years ago

In case anyone, like me, is trying to solve this using Docker containers on a Mac,.. and using Laradock (which I believe is currenty Laravel5.2)(https://github.com/laradock/laradock). Here are the edits I needed to get beyond this 'Whoops error'. :-)

  1. Ensure that your php-fpm container has a defined hostname. I edited laradoc/docker-compose.yml to add the following line to the php-fpm container definition. hostname: php-fpm

  2. Edit bootstrap/start.php detectEnvironment section to use that hostname. I did this: 'local' => array('php-fpm'),

  3. turn off redis by editting app/config/cache.php to become this: 'driver' => 'file', // 'driver' => 'redis', I couldn't figure out how to get laravel-tricks to use my Redis Docker Container.

  4. Edit main.blade.php to change css/laratricks.min.4.css to be css/laratricks.min.css

  5. Edit navigation.blade.php to fix logo@2x.1.png to read logo@2x.png.

After those edits, I brought my containers down,.. and then back up again. Everything worked fine. Good luck. - shawn

p.s. Afterwards,.. the app mostly worked (I was able to register a user) however the 'Creating a new trick' form failed for me because I wasn't allowed to edit the 'trick code' form box (the other form elements behaved as expected). Cheers!

msurguy commented 7 years ago

Thanks @koppenhoefer for the write up! Hopefully that helps somebody :)