hometown-fork / hometown

A supported fork of Mastodon that provides local posting and a wider range of content types.
GNU Affero General Public License v3.0
743 stars 55 forks source link

Hit an error looking for webpush.git while installing v1.0.7+3.5.5 #1212

Closed biglifedecision closed 1 year ago

biglifedecision commented 1 year ago

I'm doing a fresh install from scratch of Mastodon v3.5.5 immediately followed by migrating to Hometown v1.0.7+3.5.5

I'm carefully documenting every step, in an effort to make a very thorough guide for other fairly novice users to follow.

I did a straight install from source of Mastodon v3.5.5 on Debian 11. I roughly followed the official docs, but also relied some other new guides online (especially because the official docs will trip up a novice user at at least two points, see https://github.com/mastodon/mastodon/issues/15642). I don't think any of the deviations I took from the initial docs could be the cause of the problem here (but I also barely know what I'm doing)

Installing vanilla Mastodon 3.5.5 went without issue, and quick testing seemed to confirm it's a working installation.

I then followed the current instructions for migrating to Hometown v1.0.7+3.5.5 here

I hit a snag at the database migration: RAILS_ENV=production bundle exec rails db:migrate

I got the following error:

https://github.com/ClearlyClaire/webpush.git (at f14a4d5@f14a4d5) is not yet checked out. Run bundle install first.

I took the error's advice, and ran bundle install which outputs a long list of Using, along with a few Fetching, Installing. Notably the next to last line is Using webpush 0.3.8 from https://github.com/ClearlyClaire/webpush.git (at f14a4d5@f14a4d5). I could paste the full output of bundle install here if it would be helpful. Maybe all the gems that needed to be fetched were also missing for some reason?

After that I was able to migrate the database and run RAILS_ENV=production bundle exec rails assets:precompile to successfully get Hometown. It seems to be running smooth.

Hoping for some clarity on why I hit this error. Is it an undetected mistake in my original Mastodon installation? I scrolled back to check the output of the bundle install -j$(getconf _NPROCESSORS_ONLN) command i ran when installing Mastodon, and it seems unremarkable: Fetching and Installing lots of gems, including webpush 0.3.8.

I realize this is maybe not strictly be a Hometown issue, but I only hit the snag in the Hometown migration, so figured I should raise it here. I wouldn't know how to realize something was wrong with the original Mastodon installation if that is indeed the case. Also I expect more insightful responses here! (thank you in advance)

johnholdun commented 1 year ago

It's reasonable to me that a bundle install would be necessary, sometimes, between successfully installing Mastodon and proceeding to install Hometown. Dependencies between the upstream project and this one are probably almost always the same, but could differ in some cases.

In this particular case, there is a change, specifically on the dependency you noted (see the diff here). It seems to me like that change is an upstream security fix that is more recent than Mastodon v3.5.5, but Darius would know for sure.

In short: it looks like you didn't do anything wrong, running bundle install multiple times is safe, and it's better to run it too often than too seldom. It's probably not a bad idea to add it to the migration guide at the point where you needed to run it, specifically for times like this.

dariusk commented 1 year ago

Thanks both of you -- I have changed the migration wiki page and added a bundle install right before the db:migrate step, which I believe should prevent this from happening to someone else. Thank you for the well-documented issue!