sshkit | deploying code and assets to servers | Continous Integration library
kandi X-RAY | sshkit Summary
kandi X-RAY | sshkit Summary
SSHKit is a toolkit for running commands in a structured way on one or more servers.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Handles an interaction handler callback function .
- Iterates over each host .
- Set the command status
- Returns the SSH options hash
- Execute a command .
- Converts color to a string
- Returns the class associated with the formatter .
- Logs out a warning message .
- Creates a command .
- Returns a string representing the environment variable values .
sshkit Key Features
sshkit Examples and Code Snippets
Community Discussions
Trending Discussions on sshkit
QUESTION
Deploying my application to AWS with the 'bundle exec cap production deploy' command, I got following error:
...ANSWER
Answered 2021-Jun-13 at 12:45I had that problem before. So just removed using mini_racer, decided to install nodeJs in docker.
QUESTION
I have a Rails 5.2 app, and with cap 3.4.1 we are suddenly getting this weird error:
...ANSWER
Answered 2021-Apr-08 at 07:26A wild guess: I had a similar problem and I could solve it by upgrading capistrano-passenger
to >= 0.2.1
Looks like the version change of passenger from 6.0.7 to 6.0.8 has introduces a problem. I see you are also on 6.0.8, so it might affect you, too!
QUESTION
I am attempting to deploy a ruby on rails web app to a staging server but continue to get the error: bundle stderr: /home/deploy/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/rubygems.rb:275:in `find_spec_for_exe': Could not find 'bundler' (1.16.1) required by your /home/deploy/apps/MYAPP/releases/20201230174246/Gemfile.lock. (Gem::GemNotFoundException)
I have attempted to install bundler on the server directly, and even after doing so it continues to fail with the same error. Full error log and deploy.rb below.
Full Log:
...ANSWER
Answered 2021-Jan-08 at 19:56I was able to get past this blocker. The ultimate issue is that I had to log into the correct shell and run gem install bundler:1.16.1.
In order to log into the bash I used this command: /bin/bash --login
Then run gem install: gem install bundler:1.16.1
QUESTION
I'm trying to deploy my Ruby app using capistrano (repository is on gitlab) and I get this error:
...ANSWER
Answered 2021-Jan-05 at 06:03Try add the allowed ssh keys to your production machine/ server. That is:
- run
cat ~/.ssh/id_rsa.pub
on your local machine - Then run
~/.ssh/authorized_keys
on your server/production machine - Copypaste the result of step 1 above in your authorized_keys file on your server
- then run
cap production deploy
command again
Incase you don't see authorized_keys file when run ~/.ssh/authorized_keys
you can combine all the above commands that is 1 to 3 by running
cat ~/.ssh/id_rsa.pub | ssh USER@HOST "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
.
QUESTION
I saw a lot of similar questions here, but nothing of provided advises has helped. Every time I run cap production deploy
I got error:
ANSWER
Answered 2020-Oct-21 at 15:11How I solved it:
- Go to server command line
- As we can see in error log, the last command before error appears was:
Command: cd /home/deploy/project/releases/20201018151933 && ( export RAILS_ENV="production" RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.6.5" ; RBENV_ROOT=$HOME/.rbenv RBENV_VERSION=2.6.5 $HOME/.rbenv/shims/bundle exec bundle check )
So we go to our folder:
cd /home/deploy/project/releases/20201018151933
and run there command:
export RAILS_ENV="production" RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.6.5" ; RBENV_ROOT=$HOME/.rbenv RBENV_VERSION=2.6.5 $HOME/.rbenv/shims/bundle exec bundle check
After that we see same error:
Could not find concurrent-ruby-1.1.7 in any of the sources. Run 'bundle install' to install missing gems.
- In same folder run
bundle install
and after gem installed we can out of server command line. - Run
cap production deploy
and everything is gonna be fine.
I still don't know what is the root problem of this error, and how to fix it permanently, but this works for me. I hope it will be useful for anyone else.
QUESTION
this is my first attempt to deploy a Rails app using Capistrano. I am following the tutorial at https://ogdenstudios.xyz/blog/how-do-i-deploy-a-rails-6-app-to-amazon-ec-2/ to deploy to an AWS EC2 instance. My app is on Rails 6 and runs smoothly on localhost. I followed the tutorial but I am stock in the final step, when i run cap production deploy
y get the following error:
ANSWER
Answered 2020-Aug-07 at 23:49AWS ec2 instance require pem key to connect to it, so you must tell capistrano what key is use, I think you need add this config to your deploy file:
QUESTION
Trying to deploy a rails 6 application to a Digital Ocean droplet.
I run cap production deploy
and it fails with this error:
ANSWER
Answered 2020-Jul-23 at 12:36I had endless problems deploying this app. Credentials problems, sassc nightmares and more. In the end, I started a new 5.2.2 project, copied in the controllers, models, migrations, views, routes, etc., and changed a few instances of [6.0] to [5.2]. First try deployed perfectly and the app is now live. I can only assume there is something not fully working with my rails 6 install. Thanks for your replies, guys.
QUESTION
I picked up a 4 year old project written in Ruby 2.1.3
and Rails 4.1.8
.
Very few of the gems were versioned but I've managed to get the project running locally by installing mysql2 0.3.20
as suggested in multiple other threads. Doing this required me to (on MacOS) downgrade openssl and mysql with brew install mysql@57
and brew install openssl@10
.
I could then install mysql2
with by passing the correct libraries to it:
gem install mysql2 -v 0.3.20 -- --with-mysql-config=/usr/local/opt/mysql@5.7/bin/mysql_config --with-ldflags=-L/usr/local/opt/openssl@1.0/lib --with-cppflags=-I/usr/local/opt/openssl@1.0/include
Everything works locally, all good.
I'm trying to deploy this project with Dokku on a Debian instance. Here's the readout from the push to dokku master including the error thrown when starting the Rails server:
...ANSWER
Answered 2020-Jun-22 at 18:38I think I see what's going on. In your Dockerfile, change your DB_URL from: mysql:// to mysql2://
You are loading the mysql2 gem, but indicating to ActiveRecord that you want to use a connection via the mysql gem.
QUESTION
I am using rails "v6.0.2.2". I am following a gorails tutorial to deploy a rails 6 app to a digital ocean droplet using the following gems. Also note I am not using his app from the tutorial I made my own.
- gem 'capistrano', '~> 3.11'
- gem 'capistrano-rails', '~> 1.4'
- gem 'capistrano-passenger', '~> 0.2.0'
- gem 'capistrano-rbenv', '~> 2.1', '>= 2.1.4'
When I run cap production deploy
it hangs up on,
ANSWER
Answered 2020-Jun-17 at 02:18I had similar issues in the past deploying apps in small servers (5usd DO droplets, nano EC2). Those servers have little resources, and some heavy operations (installing nodejs, running bundle install) hit some problems. Try adding swap space to your droplet. https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04
QUESTION
I have an Ubuntu server to deploy my Rails projects. In my Ubuntu server I had RVM.
Now I want to deploy new projects with Rails 5.1 and webpacker. To deploy this projects, I've installed NVM, npm and yarn in my Ubuntu server.
In my Rails 5.1 / Webpacker project I have following gems for capistrano deployment:
Gemfile
...ANSWER
Answered 2017-May-11 at 09:55The error tells you pretty much what's wrong. Neither Yarn or Node can be found on the server. Your installation might be incorrect.
Follow instructions to install both here:
https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
and here:
https://yarnpkg.com/lang/en/docs/install/#linux-tab
Then make sure you can call:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install sshkit
On a UNIX-like operating system, using your system’s package manager is easiest. However, the packaged Ruby version may not be the newest one. There is also an installer for Windows. Managers help you to switch between multiple Ruby versions on your system. Installers can be used to install a specific or multiple Ruby versions. Please refer ruby-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page