HEY
I'm remaking witches.academy, and I'm stuck at bundle exec rake secret.
It's super not working and I'm stuck >.>
My error says package configuration for protobuf is not found
Also, this keeps popping up?
An error occurred while installing cld3 (3.1.2), and Bundler cannot
continue.
Make sure that `gem install cld3 -v '3.1.2'` succeeds before bundling.
@spiderrobotpig Using Nanobox, or ...?
@sendoshin Apparently I could just do a native install in Digital Ocean and my account is still good so I did it there.
Currently working from this: https://anystack.xyz/how-to-install-mastodon-ubuntu/
@spiderrobotpig Yeah, it was added as a dependency when language detection was upgraded a few versions back. Took me a while to figure everything out to make that work properly so that Nanobox could handle it automatically.
So the first step is you have to actually install protobuf using the system package manager. Assuming Ubuntu, `sudo apt-get install protobuf-compiler` should pull in everything you need.
@sendoshin It says that package config isn't found, but that the package is installed.
Bluh I forget how frustrating this can get >.<
@spiderrobotpig Yeah, it's pretty much a nightmare managing Ruby dependencies, especially if there are any binaries involved.
So, basically it's trying to build its own version of a library called CLD3, which is the language detection library used in Chrome. It has to build its own because the normal version depends on Chrome itself, and that's just way too much for most uses.
But. It needs help to find the other things it still depends on...
@sendoshin Makes sense. No idea how to fix it though?
Because I've installed the package and the dependencies both with root and the mastodon user and for some reason bundle install can't find them
@spiderrobotpig It's honestly been nearly two months since I tackled this myself, so ... I'm trying to remember all the details... Sorry for the delays.
@sendoshin No worries. I appreciate the help.
If it's too much I'm sure I can figure it out at some point
@spiderrobotpig So, for some reason it's having trouble finding one of the libraries it needs. I'm trying to remember which ones it depends on, other than protobuf. Because there was at least one it didn't actually have a way to detect and warn about in the build process itself...
I wanna say it's zlib? `sudo apt-get install zlib1g`? I mean, that's usually already installed, but I guess you never know...
@sendoshin Yeah it's already there.
Bluuuuuuuuuuh
I guess I'll just wait until I can get $10 up and use nanobox this is bullshit
@spiderrobotpig I can zap you the $10 if you like... I think you get like 20 days free, though, so ... up to you.
@sendoshin Oh yeah, you're right.
KK I'm gonna do that how awful is this gonna be?
@spiderrobotpig Not awful at all, in my experience. I documented the process in the official docs, but I have a much more detailed walkthrough on the Nanobox blog that I highly recommend, especially for the bits about managing it once it's up.
@sendoshin Link plz? haha
@sendoshin Oh god this looks so much more complicated >^<
@spiderrobotpig Skip the bit about what I did to make it work. It's a lot less intimidating than you think.
@spiderrobotpig Ah, whoops. You can just re-use those values from when you set it up the first time. You'll want to import your database contents anyway, if they're still around, so there will be an extra step or two not in that doc.
Alternately, if you're starting over from nothing completely, you can just clone the Mastodon repo on your computer and run it in that directory. All Nanobox commands are meant to be run in the root folder of your project.
@sendoshin I'm so confused now >.<
@spiderrobotpig Sorry. The values you're setting in the dashboard are the same values you would have set in the .env file manually. So you can take the values from your existing .env file on DO and just use them, here.
@sendoshin I honestly have no idea what you're asking me to do now tbh
Like, I don't understand how this is supposed to work at all apparently.
@spiderrobotpig Hrm. How to reword...
So, you already have a Mastodon instance running on DO, right?
@sendoshin No, that's the problem. I can't get it running because that awful fucking update
@spiderrobotpig OK, not running, then. Installed? It sounded like it was at least running at one point...
@sendoshin It was at some point, but it's not now. The droplet got deleted
@spiderrobotpig Ah. OK. So you have to regenerate the secrets. Gotcha.
In that case. What OS are you running on your computer?
@sendoshin I'm on windows rn
@spiderrobotpig Alright, do you use git there much?
@sendoshin A little bit? I'm using the app at the moment, and I have a program where I can SSH into the droplets
@spiderrobotpig OK, cool. We don't need to access the droplets at all, really.
So we're gonna need to clone the Mastodon repo from GitHub onto your computer. Not sure which app you use for that, but it should work fine with https://github.com/tootsuite/mastodon as the origin URL.
@spiderrobotpig (Argh. Masto "helpfully" dropped the https part...)
@sendoshin I already have a Mastondon repo on here
@spiderrobotpig Oh, even better. Forget I said anything about cloning it. :D
@sendoshin Oki. Copying over the variables from the old .env.production at the moment
@spiderrobotpig Ah, perfect. That's the one I meant, even!
@sendoshin But I still don't understand where I'm supposed to be running these things. Because I can't get bundle install to work on the droplet
@spiderrobotpig Right. You won't interact with the droplet directly at all. Nanobox will do that for you.
@sendoshin OKay, but I need to generate the secrets and you said there's something else I need to run?
git checkout $(git tag | tail -n 1)
@spiderrobotpig Nah, you already generated the secrets. I need to update that article for migrating from other places.
As to that git command, it just makes sure you're using the latest tagged version. You've probably done that manually already.
@sendoshin I didn't generate the secrets though, remember? That was the whole reason I tagged you in
@sendoshin The secrets wouldn't generate because bundle install won't work cos that bullshit update
@spiderrobotpig Right, but you copied the old ones from your old .env.production, and they should work just fine.
@sendoshin No I didn't have them there. That was the one I was working on
@spiderrobotpig Ah. Well, then, we can generate them next. You'll need to be in the command prompt I mentioned earlier far that, too.
@sendoshin Trying.
Powershell isn't letting me change directory I swear to fucking god right now
@spiderrobotpig ..... Wow. Way to go Windows?
@sendoshin Managed it in CMD.
Okay, thanks again for all of this. What do I do next?
@spiderrobotpig Oh, sorry, I was trying to update the article a bit as we went along.
If you have Nanobox installed, you should be able to run that command to generate the secrets right from there.
@sendoshin From where? I don't know what you mean when you say that
@spiderrobotpig It would have been typed into CMD.
@sendoshin bundle install wouldn't work in CMD
@spiderrobotpig Which is why it would have been `nanobox run bundle exec (etc)` instead...
@sendoshin Bluh >.<
I'm so close to crying at this point.
@spiderrobotpig Yeah. I'll just stop. Sorry.
@sendoshin It's fine. Do you think I should try it again now that I know that?
@spiderrobotpig Up to you. I really need to pay a lot more attention to Masto while you do, if you do, though, because delays in support aren't very supportive...
@sendoshin OKay, so what specifically am I supposed to do here? CD to masto and then run that command to get the needed information?
@spiderrobotpig Yeah, that should do it. You'll have to run it three times to get all three values, but the second and third times will be TONS faster.
The first time is when Nanobox runs `bundle install` and so forth for you.
@sendoshin OKay, it looks like it's doing something at least.
Gonna go smoke while it starts and see if I can get verbal again. Thanks again for this
@spiderrobotpig Of course. I'm sorry it's been such a pain! The Nanobox process is usually much simpler than the others, so the trouble we've had this time is annoying and makes me sad.
@sendoshin OKay, it's on building bridge right now, so I spose I just wait?
@spiderrobotpig A bit longer, yeah. It ... takes a while the first time.
@sendoshin Apparently I'm missing BOXFILE.YML?
@spiderrobotpig Hmm. Which version of Mastodon is your repo on?
@sendoshin I think the latest? When I try to update it says I'm updated
@spiderrobotpig Huh. Weird. Can you see a boxfile.yml in the directory?
@sendoshin Nope, none here
@spiderrobotpig Very odd. The latest Mastodon definitely has that. How about one called Gemfile ?
@sendoshin I do have a gemfile
@spiderrobotpig Huh. Yeah, the boxfile.yml should be in the exact same folder with it.
Do you know what URL it's updating from?
@sendoshin Also apparently they're not going to be able to fix the issue with the SSL thing until tomorrow so that's awesome
@spiderrobotpig Yeah, their coders aren't in today. We live in a very Mormon area, so Sundays are very off limits for working. I'm amazed you were able to chat with the CEO via the site's support chat, tbph.
@spiderrobotpig (Apparently I'm getting creds to hop on that live chat, myself, sometime tomorrow as well? Which is weird, since I don't actually work for them, but I do tons of support stuff for them in Slack already, so... 🤷🏻 )
@sendoshin Okay, so I cloned https://github.com/tootsuite/mastodon.git and there's still no BOXFILE.YML
@sendoshin Oh wait, yeah there is
@spiderrobotpig Oh, good. I don't have to beat down Gargamel's door to get it put back in. 😁
@sendoshin I have never been so enraged at someone I hardly know tbph
@spiderrobotpig Had to open the conversation stream to see which person you meant. 😄
@sendoshin Yeah haha
Also if you talk to whoever I was talking with or w/e sorry I was kinda bitchy >.> I didn't mean to be but yeah, breakdowns aren't fun for anyway.
@spiderrobotpig It's all good. I already smoothed that one over. And really, he mostly just seemed disappointed he couldn't help.
@sendoshin That's good at least. I don't like being rude to people, especially cos I'm usually the one on the other side of it but bluh. I feel like I could have handled it better, but I was better than Ive seen myself be
@spiderrobotpig I know the feel.
Weird how we actually see ourselves doing shit we dislike having done, rather than see the memory through our own eyes. If that makes any sense.
@sendoshin Yeah, I think so?
@spiderrobotpig Is it working better this time?
Please be able to say yes!
Please be able to say yes!
Please be able to say yes!
@sendoshin Error : failed to execute hook (build) on 1919bacd527efa27b9ac747b581fdb2395cda6e3fe29b4f9b1ece1402ba97340: util:Exec:/opt/nanobox/hooks/build: bad exit code(1):
Context : failed to build the code
Bluuuuuuuuuuuuuuh
@sendoshin So it's not building in nanobox either apparently yay
@spiderrobotpig Which is a serious problem that I want to fix, for you and for everyone. Because not building is bullshit.
Oh hey, our friend showed up faster this time Error : failed to execute hook (setup) on 9fb0caaf0dc1e65c442151eecebda4673b0d7f45243f956d901a03866301f337: util:Exec:/opt/nanobox/hooks/setup: bad exit code(1):
Context : failed to build the code
@spiderrobotpig Huh. Well, that's good, at least.
The actual error should be a bit further up the output.
@sendoshin Connection timed out is the only other thing I see
@spiderrobotpig Any indication of what it was trying to connect to?
@sendoshin downloading packages...
libffi-3.2.1nb2.tgz 100% 54KB 53.7KB/s 53.7KB/s 00:00
libelf-0.8.13nb1.tgz 100% 95KB 94.6KB/s 94.6KB/s 00:00
pciids-20150907.tgz 100% 233KB 232.6KB/s 232.6KB/s 00:01
libpaper-1.1.24.tgz 100% 25KB 24.8KB/s 24.8KB/s 00:01
pkgin: http://pkgsrc.nanobox.io/nanobox/base/Linux//ghostscript-fonts-8.11nb3.tgz: Connection timed out
@spiderrobotpig Oh. Damn. Yeah, they really need to get a CDN in front of that. I'll remind them to boost the priority on that tomorrow.
@sendoshin Sounds good. It does seem to be doing stuff again so I'll just wait and see what happens
@sendoshin Might be stuck here?
- Running bundle install :
bash: bundle: command not found
- Cleaning bundle :
bash: bundle: command not found
- After build hook 1 :
$ envsubst < .env.nanobox > .env
- After build hook 2 :
$ gem install bundler
@sendoshin There's no indicator, but that might be normal
@sendoshin Oh I think it's working. I didn't get an error on bundle and now it's doing yarn
@spiderrobotpig Ah, I spoke too soon. The real install phase is done by the time you get to yarn (an NPM replacement that's like a 100Mbps connection to NPMs dialup).
@sendoshin I think it's just installing yarn tbh
@spiderrobotpig Nah, yarn is actually installed elsewhere. It's literally almost done with the JavaScript side of installing things.
@sendoshin Oh fair enough. It's stashing the build environment now
@spiderrobotpig Sweet. That means it successfully installed Mastodon and all its dependencies. We're already further than you were on DO directly!
@sendoshin Oh that's good I think? I still have no idea what's going on because I'm used to Linux, but if you say it's working I'll trust you
@spiderrobotpig Oh, it's actually very Linux inside. Right now it's storing a copy of everything it just did so that you can use it elsewhere much more quickly. Roughly the same thing as what docker compose does, really, just a hell of a lot smarter about it.
@sendoshin Okay, I got one key. Hopefully the next one is faster
@spiderrobotpig Yeah, by tons. Like literally tons.
@sendoshin Okay, running deploy, gonna see how that works
@spiderrobotpig Got all the variables in place, already? You're a fast witch!
@sendoshin So, I have literally no idea what to do now