Running nette under mac I don't get the Blog Home Page running – server error

kd4ttc
Member | 5
+
0
-

When trying to get the example running I get a server error.

[2022–10–22 00–24–59] ArgumentCountError: Too few arguments to function App\Presenters\HomepagePresenter::__construct(), 0 passed in /Users/sholland/Documents/WebDevelopment/nette-blog/temp/cache/nette.configurator/Container_4d778123ac.php on line 113 and exactly 1 expected in /Users/sholland/Documents/WebDevelopment/nette-blog/app/Presenters/HomepagePresenter.php:14 @ http://localhost:8000/ @@ exception–2022–10–22–00–08–020170c170.html

Seeing where that is I suspect I am not connecting to the database.

I have a MySQL server running.

local.neon contains:

parameters:

database:
  dsn: 'mysql:host=127.0.0.1;dbname=quickstart'
  user: root
  password: password

Anyone running on a mac have success in getting the Blog Home Page example working?

Marek Bartoš
Nette Blogger | 823
+
+1
-

If you added a new dependency to a service, you either have to delete /tem/cache/nette.configurator or have debug mode enabled (so container reloads automatically when service dependencies (constructor or inject properties/methods) change)

Last edited by Marek Bartoš (2022-10-22 00:51)

kd4ttc
Member | 5
+
0
-

Holy Moly!

Worked! Thank you very much!

OK, so it is magic for me right now. Is there something in the documentation that explains this sort of stuff?

kd4ttc
Member | 5
+
+1
-

Thank you both very much. I feel fortunate to have joined a very supportive community.