I am new to RoR and try to follow the startup guide to get up to speed. Somehow I have the following issue and could not find anything useful yet.
I have created a new project and a model ‘Item’. Within the rails console, I created an item. According to the startup guide, the ID is not set in the object.
Thanks for any hints.
Setup:
Linux on ChromeOS
Database: SQLite
rails --version
Rails 7.1.3.2
ruby --version
ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux-gnu]
Postgres has kinda become the “gold standard” for database things with Rails. (SQLite is cool, don’t get me wrong, but is best used when you only have tons of reads and not much writing going on.)
The application I am building is exactly this. It does not need much writing and I want to keep it as simple as possible.
Furthermore, Rails uses SQLite as default if nothing is specified. If the getting started guide is not working as expected, it’s a pity.
I created a new app to test with SQLite, and it works as expected. If everything works correctly with Postgres, could there be something with your specific installation of SQLite?