New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploy issue: "bundler: command not found: capistrano" despite "bundle install" clearing without errors? #4089
Comments
You can try |
Nope, no good. :( (same error) |
@GlassedSilver cd ~/danbooru work for me |
Hmm... just so we're clear... I run these command on my deployment VM, right? Anyhow, that's what I did and when I issued "yarn install" the terminal returned: 00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'install' ~/danbooru being my project folder all there is inside of it is the INSTALL.debian script. What kind of system are you using and do you have a list of dependencies you installed? Because I noticed that a fresh Ubuntu 18.04 needed a lot of packages added. Not that that's a bad thing in itself, it was mostly just a nuissance to run, inspect error, find dependency, install dependency, run again, rinse and repeat the same process over and over again. I eventually wrote down whatever it wanted me to install so should I try with a completely new installation I wouldn't need to figure out everything all over again. :D Also I could add contribute to documentation if desired. Wouldn't mind at all to replay the process once I'm comfortable and help others too step by step. :) Update: Solved the issue with yarn, proceeding with the rest for now. Basically Ubuntu's repo has an ANCIENT version of yarn. I mean... it's REALLY old. 0.2 or something. yarnpkg/yarn#3708 (comment) solved it. (and the comment pradt refers to) Spits a bunch of warnings though... (will update with what it says a little later) Update 2: These are the warnings I'm getting when I yarn install. (yarn version 1.16.0)
|
Well a little install script to ease your life (tested in Ubuntu Server 18.04). You can get it here: http://puu.sh/DD1We/650c540098.sh Once the script is done and you logged in with the new user you can go ahead and do the following: Move the files from: to: danbooru/config/danbooru_local_config.rb After that: cd ~/danbooru If during the bundle install you get a warning like "can't find gem bundler" it can be fixed by doing either: a) gem install bundler -v 1.16.1 After that you'll have to modify the script according to your setup and needs. And regarding the warnings I don't know too much about that, hopefully someone else will answer it. |
Wow, thank you! I'll try it out soon, no sure if I still get to it tonight, because I'll be leaving for an anime convention in a few hours (how fitting... :P) but that's definitely something I'll be looking forward to if I can't get it done by the time I head off. Again, thank you so very much. As for the system you tested it on: am I right to assume you deploy and run everything on the same machine here? I thought it was advised to deploy from a machine other than what the server is running on? At least the man himself said so in 2015. :) |
Nah, Im using Windows 10, remotely connected to my Ubuntu server VM where I deployed the booru. |
Hang on here... Could it be I'm running the bundle install command on the wrong machine? I am probably supposed to ssh into the machine and execute these commands on the actual server, remotely from my PC, right? Because I thought the capistrano instance is suppose to be executed from my PC... Ooof... I can smell I've been the biggest potato ever the whole time. Edit: well if I run bundle exec capistrano production deploy on my server itself (ssh'd into it) I get this error: Could not locate Gemfile or .bundle/ directory What's my work directory supposed to be or what else could be off? |
Okay so I tried your modified script and it definitely progressed pretty well for the most part. I still got those weird warnings during the "yarn install" command, but since they were warnings and not errors I decided to try and go ahead anyways for now. Now I'm having issues with "bundle exec cap production deploy".
|
You're getting that error because you didn't customize your config/deploy/production.rb As you can see at the end of the script you'll need to modify the mentioned files according to your needs and preferences. the provided install script (your github repo url) Create a fork of the danbooru repository, modify the files above with your domain/ip or whatever you'll be using and push the changes to your repository. After that log in with the danbooru account, make sure to delete your old "/home/danbooru/danbooru" folder, do a git clone of your repository with "git clone git://your_repo_url.git ~danbooru/danbooru" and then finally, go to that folder and run the commands to do the deploy (yarn bundle install, etc). |
Woops, indeed, I did edit those files but I must have missed setting the IP since I used a new VM to start with a clean slate. Now deploy errors out on pushing changes to my git repo??? Why the hell does it desire to write to my repo? I've now git cloned https://github.com/..... instead of git:github.com/.... because it told me to use https instead of git. Still not sure why it insists on writing to my repo. Edit: I see, it wants to create a marker. Fair enough, I guess but in my eyes more warning-worthy than worthy of failing a deploy? Nevermind. Now it seems it did do all of its jobs, buuuut... when I point my browser to my server's URL all I get is the Welcome to nginx page. sigh |
First you'll need to check if the deploy was successful, you should have seen a lot of information and by the end you should have gotten a "newrelic" error (just because some missing configuration) and then the unicorn and jobs were executed. That means that if you're getting the nginx starter page you'll need to check your nginx configuration, so: Go to "/etc/nginx/nginx.conf" and check if it has "include /etc/nginx/sites-enabled/*.conf;", add it if it doesn't and then reboot the services (nginx, danbooru, etc. or just reboot the VM). You can do that using: Now you can try again and if it still doesn't work you can try the following: def ssl_options |
Indeed, I did get that. (something about no license key being found) Can't I configure it to not use New Relic? For what I'm going to use it for I have zero need for NR from what I understood about it and more importantly it's an external service for logging. No thanks. uwu I did set the SSL mode to off, restarted the VM - still no good. As for nginx.conf that file is looking good. It does have the line you mentioned. Despite the issues right now I sense I'm THIIIS close to finally having a running deployment. That alone makes me super happy, that I received so much help from you guys so far, absolutely terrific and let it be known that I'm EXTREMELY grateful. |
Well @GlassedSilver edit :/etc/nginx/sites-enabled/danbooru.conf and change: server 127.0.0.1:9000; for: server unix:/tmp/.unicorn.sock; reload nginx/restart booru and check if it works. |
Okay, I'm slowly getting there... I think I can narrow it down. I temporarily edited /etc/nginx/sites-enabled/danbooru.conf to use port 8080 instead of 80 and instead of getting no connection at all I am getting the "Faiilbooru" page when I browse to the server's IP:8080 which means I can already at least speak to the danbooru instance! Of course it expects to run on port 80 so that's why it errors, now all I need to do is make nginx not use the default page over danbooru for port 80. Funny thing is... I removed default from sites-enabled and yes I rebooted... Still nothing. This ought to be an nginx error. ponders Why is nginx is such a b....? Edit: Alright. I changed the port back to 80 in the configuration file, issued "sudo nginx -s reload" and then browsed to my server's IP without port 8080, and it shows me the Failbooru page... I guess I'm happy enough I can target the instance on the proper port now... but why did danbooru itself error out? Investigating now. I'll keep you guys updated. |
Alright so in my endevor to troubleshoot the Failbooru page I tried to launch the rails console using "rails c" and alternatively "rails console" but apparently it's not installed? Does rails really not have a console ready to go by default or am I missing something here (yet again)? I looked up a bunch of tutorials for rails console and apparently the whole world launches the console just fine using either of the commands I mentioned except my VM seems to know nothing about rails console. (so far successfully tested the database using psql) |
Closing this in favor of #4096. |
I checked if the capistrano version is correct, it is. bundle info capistrano returns version 3.11.0.
I'm a bit baffled, I must be missing something here that must be self-explanatory to someone half-way experienced with ruby/capistrano. The install script only mentions the one like
bundle exec capistrano production deploy
But that's where the fun stops for me:
bundler: command not found: capistrano
Install missing gem executables with 'bundle install'
Other than that I have since finished the part on my server. (trying to deploy from a separate VM that also runs Ubuntu 18.04. Server edition for the danbooru VM and Desktop for the deployment VM)
Sorry if the question is super silly. I did try googling and asking in another place, but maybe that's a project-specific issue? Not sure. (googling the error in brackets returns only three results and they are... sketchy.....)
The text was updated successfully, but these errors were encountered: