Installing mysql2 gem errors on Apple silicon M1, M2 or M3 Mac running macOS Sonoma.
Make sure mysql-client, openssl and zstd are installed on Mac via Homebrew.
Replace
mysql-clientwith whichever mysql package you are using
| <?php | |
| # composer require web-token/jwt-framework | |
| require_once 'vendor/autoload.php'; | |
| use Jose\Component\Core\AlgorithmManager; | |
| use Jose\Component\KeyManagement\JWKFactory; | |
| use Jose\Component\Signature\Algorithm\ES256; | |
| use Jose\Component\Signature\JWSBuilder; | |
| use Jose\Component\Signature\Serializer\CompactSerializer; |
| -- Get Max ID from table | |
| SELECT MAX(id) FROM table; | |
| -- Get Next ID from table | |
| SELECT nextval('table_id_seq'); | |
| -- Set Next ID Value to MAX ID | |
| SELECT setval('table_id_seq', (SELECT MAX(id) FROM table)); |
First, Create a folder inside of lib called seeds
Put your CSV file example.csv into the lib/seeds folder. In the example below, the file is called real_estate_transactions.csv
Make sure you've created a resource with the appropriate columns to match your seed data. The names don't have to match up.