Developer Journal, Day of the Disappeared
Today marks the International Day of the Disappeared, drawing attention to people missing due to secret imprisonment.
As the calculus of accepting refugees returns to the public discourse, keep in mind that you probably know people who have been affected by this sort of violence, whether it happened in your country, or they arrived in your country seeking asylum from it.
In any caseâŚhereâs some talk about code.
Library Updates
On a day when I wasnât able to put in any real work, I let GitHub automatically merge an update for Uxuyu and Bicker.
Fýlakas Onomåton
The big goal for this week was getting Fýlakas Onomåton to deploy on Heroku.
Ruby Versioning
The first part of this was finding a version of Ruby thatâŚ
- The system would allow me to upgrade (or downgrade, if need be) to, and
- Matched something that Heroku supports.
Unfortunately, this hits one of the unfortunate snags with working with Ruby: Different installation methods are stuck on different versions, and they all conflict and are used in different ways, because they all expect to be the only instance. My default Ubuntu bundler conflicted with my RVM installations of Ruby and vice versa, so the versions all declared code to be broken. And itâs non-trivial to vacuum out all the bits of the former so that at least RVM will actually work as expected. And even then, itâs not always a global solution, if something still âremembersâ an old version.
I settled on Ruby v3.0, since itâs now considered the stable version, but that obviously required other upgrades. To be fair, though, Rubyâs development team has made upgrades much more sensible than they once were.
Database Issues
Also, getting it ready for deployment in production meant setting everything up to serve the compiled assets and making sure that SQLite isnât even referenced in the project.
Migrations also arenât run when deploying, which feels like a peculiar stance to take. That raised an issue that one of the existing migrations was incorrect. I previously had the following, to add a foreign key referencing the user table to the activations.
add_reference :activations, :user, foreign_key: true
The foreign_key
clause is not only unnecessary, but it causes some deploymentsâlike whatever Heroku is usingâto try to create the foreign key twice, causing an error. Unfortunately, this means that anybody who might be playing with this at home will have a retroactive breaking change. I donât see that being a large community, howeverâŚ
Real Work
Youâll also see improved styling on the tables and at least stubs of static pages.
Anyway, long story shortâtoo late, I knowâyou can check out the server running at http://onomaton.club/. I wouldnât register an account just yet, since I still need to read up on how to manage SSL certificates, here. Iâm not paying Heroku twenty dollars for the SSL service, since thatâs far more than the VPS that this project would need, and the point of using them was to keep this cheap, but it looks like thereâs a way to manage the certificate through AWS. That might be ugly, but again, the expected revenue for this project is a couple of dollars from people buying the app, so I have no interest in spending any more money on it than is strictly necessaryâŚ
Entropy Arbitrage
In trying to get FĂ˝lakas OnomĂĄton deployed on Heroku, as mentioned above, I needed to mess around with the Ruby configuration, moving to RVM. Unfortunately, the aforementioned incompatibilities struck, leaving it impossible to run any of the Jekyll code. That meant that I couldnât test any changes or publish a new post.
Fortunately, after finally clearing up all the ambiguities that I could find, and then upgrading all the packages, everything managed to get back on track. And as a bonus, the blog now runs using Jekyll version 4, which has some new conveniences that I should explore soon.
Next
Now that FĂ˝lakas OnomĂĄton is squared away, I want to circle back to DoritĂs OnomĂĄton to add a semi-critical feature that I forgot about: When requesting an activation code, the app should supply device information. Without information about the device, thereâs no reasonable way for a user to determine when to revoke an API key. Then I start looking at how to submit the app.
Full disclosure, though, I seriously never expected thisâa silly little app to generate random nonsensical namesâto be the project that spiraled out of control. What started out as a quick experiment to see if Flutter was worth working with has now affected every Rails project Iâm working on, pushed me to use Heroku for the first time, and now Iâm reading about AWS. Similarly, the âIâll just throw together a serverâ project has been taking up time for four months, on Saturday.
Credits: The header image is Bandera de los Desaparecidos â DĂa de la Memoria by Banfield, made available under the terms of the Creative Commons Attribution Share-Alike 3.0 Unported license.
By commenting, you agree to follow the blog's Code of Conduct and that your comment is released under the same license as the rest of the blog.
Tags: programming project devjournal