capistrano | A deployment automation tool built on Ruby , Rake , and SSH | Continuous Deployment library

 by   capistrano Ruby Version: v3.17.3 License: MIT

kandi X-RAY | capistrano Summary

kandi X-RAY | capistrano Summary

capistrano is a Ruby library typically used in Devops, Continuous Deployment applications. capistrano has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

Capistrano is a framework for building automated deployment scripts. Although Capistrano itself is written in Ruby, it can easily be used to deploy projects of any language or framework, be it Rails, Java, or PHP. Once installed, Capistrano gives you a cap tool to perform your deployments from the comfort of your command line. When you run cap, Capistrano dutifully connects to your server(s) via SSH and executes the steps necessary to deploy your project. You can define those steps yourself by writing Rake tasks, or by using pre-built task libraries provided by the Capistrano community.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              capistrano has a medium active ecosystem.
              It has 12481 star(s) with 1830 fork(s). There are 322 watchers for this library.
              There were 1 major release(s) in the last 12 months.
              There are 53 open issues and 1061 have been closed. On average issues are closed in 43 days. There are 4 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of capistrano is v3.17.3

            kandi-Quality Quality

              capistrano has 0 bugs and 0 code smells.

            kandi-Security Security

              capistrano has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              capistrano code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              capistrano is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              capistrano releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              capistrano saves you 4832 person hours of effort in developing the same functionality from scratch.
              It has 10202 lines of code, 336 functions and 122 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed capistrano and discovered the below as its top functions. This is intended to give you an instant insight into capistrano implemented functionality, and help decide if they suit your requirements.
            • Adds a filter to the server .
            • Invokes a task .
            • Define a file
            • Execute a shell call .
            • Configures TLS configuration .
            • Returns true if the value exists .
            • Setup the command .
            • Instantiates a new instance .
            • Loads the dependencies of the load
            • Defines a task .
            Get all kandi verified functions for this library.

            capistrano Key Features

            No Key Features are available at this moment for capistrano.

            capistrano Examples and Code Snippets

            No Code Snippets are available at this moment for capistrano.

            Community Discussions

            QUESTION

            Rails 7 engine how to make uncompiled stylesheets available to host app?
            Asked 2022-Apr-03 at 13:08

            So I have a file not found problem. I have an engine that works in development mode in the engines test/dummy app, the engine allows the editing of sass variables and stores them in a theme table, the variables are used by a sass partial such as _banner.scss containing variables used in the main stylesheet such as $banner_color which is then imported into the main stylesheet which in turn is precompiled using an initializer in the engine.rb file and inclusion in the app/config/engine_name_manifest.js.

            The files are all available in development with the local dummy app but not in the eventual host app due to the assets being compiled.

            I have a rake task that takes the data, updates the relevant partial e.g. _banner.scss with the data from the theme table but of course the partials are not not available in a host app as the engine has already compiled them. I'm looking for a solution that will allow me to edit the raw, uncompiled stylesheets then recompile them. Obviously my Capistrano deploy script will need to reapply the stylesheet changes every deployment but that is just a rake task call. What approach should I take? Should I find a way to copy the css files to the host app in an engine initializer? Should I use a different approach entirely, I have started looking at propshaft but that is a massive step to replace sass rails and I'm not sure how that would help

            The engine

            ...

            ANSWER

            Answered 2022-Apr-02 at 03:44

            Thanks for clarifying. If I understood correctly here my take on it.

            partials are not not available in a host app as the engine has already compiled them

            Partials are still there, precompilation just outputs *.{css/js} files into public/assets/ that are declared in app/assets/config/manifest.js.

            To get to engines files, instead of Rails.root use:

            Source https://stackoverflow.com/questions/71699628

            QUESTION

            Auto restart the server after capistrano deploy
            Asked 2022-Feb-26 at 01:26

            I have nginx + nginx unit + django python application , and django project is is deployed by capistrano

            deploy.rb

            ...

            ANSWER

            Answered 2022-Feb-25 at 17:46

            With the latest release you are able to restart the application and let Unit reload the code from the workdir.

            Source https://stackoverflow.com/questions/71267640

            QUESTION

            Passenger keeps looking for wrong ruby version
            Asked 2022-Jan-27 at 22:58

            I upgrade my ruby version to 2.6.5. I deployed it to my server using capistrano.

            But my nginx logs say this:

            ...

            ANSWER

            Answered 2022-Jan-27 at 22:58

            Bingo got it working. Thanks to @razvans and @engineersmnky for pointing me in the right direction.

            Yes I had references to passenger_ruby but it was in the wrong place. I had to go to /etc/nginx/sites-available and add passenger_ruby /path/to/ruby

            To find out what the /path/to/ruby is use passenger-config about ruby-command and use the value at Command.

            Source https://stackoverflow.com/questions/70878728

            QUESTION

            Rails bundle install Could not find turbo-rails-7.1.1 in any of the sources
            Asked 2022-Jan-21 at 18:20

            On a brand new digitalocean droplet running Ubuntu 20.10 with a brand new pretty near empty rails 7 alpha 2 app running bundle install results in the following both when running cap production deploy on my local machine and when running from the command shell on the droplet

            ...

            ANSWER

            Answered 2021-Nov-09 at 14:37

            I ran into this also. Not sure why, but they yanked the 7.x versions and regressed to 0.8.x:

            https://rubygems.org/gems/turbo-rails/versions/7.1.1

            Just add this to your Gemfile:

            Source https://stackoverflow.com/questions/69891921

            QUESTION

            Want to transfer Rails application to React application
            Asked 2022-Jan-14 at 08:33

            Currently, Rails application is on service.
            The environment is following the below.

            Environment Version Rails 7.0.0 Ruby 3.0.0 Elasticsearch(using ruby'gem) - Activeadmin(using ruby'gem/management screen) - RailsAdmin(using ruby'gem/management screen) - Devise(authentication) - Capistrano(Deploy) -

            I'm thinking to introduce React to my app.
            But in case of management screen, I want to use Rails.
            Because it's already customized a lot and no complaint so far.

            I think to introduce React to Rails app is 3way.

            1. Using Webpacker
            2. Using Gem(react-rails/react_on_rails)
            3. Using create-react-app

            From my thinking, 1&2 and 3 have big differences. 1&2 is React renders from Rails View. 3 is React renders independently and Rails is just used for API.

            So I have three questions.

            1. Compare 1&2 and 3, which is faster? Is there big different?
            2. In case of 3, I think React'host should be 3000, Rails should be 3001. Is it possible to release step by step? Like introducing React only top screen, others are Rails.
            3. In case of 3, can I use RailsAdmin for management screen?

            I have no idea.
            Please help me..

            ...

            ANSWER

            Answered 2022-Jan-14 at 08:33

            I would almost always use the approach number 3, as in using Rails as an API and having admin panel. To achieve this you simply define a different route for all the api endpoints and the admin, don't overthink this. Under the rails port you can put all the API endpoints and a rails admin endpoint. Using Webpacker in rails is still supported but starting with rails 7 it is no longer the default, which means that in case of some problems (which in my experience are frequent with webpacker) you might have a harder time finding some help. Using gems to work with JS frameworks always seems to me like an unnecessary complication, and adding an extra tool to help with a different tool...

            Keep both tools to themselves, you can still have both apps in one repository nothing is stoping you from that, but Rails being responsible for the backend and react being the frontend is the most sensible approach IMHO. Nothing stands in a way of using rails app as both the API server and rails admin managment view. It is just a matter of setting up the routes.

            Source https://stackoverflow.com/questions/70706741

            QUESTION

            Can't continue deploying after for while via capistrano
            Asked 2022-Jan-07 at 17:12

            My environment is following the below.

            Environment Version Rails 7.0.0 Ruby 3.0.0 capistrano 3.16.0 Production environment Amazon EC2 Linux

            After for while from deploying, I got these logs.

            Then deploying stopped, not working anymore.

            ...

            ANSWER

            Answered 2022-Jan-07 at 17:12

            The deploy user needs to be a sudo user in order to restart the puma systemctl service.

            You can fix the issue by creating new file inside /etc/sudoers.d directory and add this line

            Source https://stackoverflow.com/questions/70622422

            QUESTION

            Connection refused error faye port 9292 private_pub gem
            Asked 2021-Dec-29 at 14:21

            I am working on a Ruby on Rails application that uses the gem Private Pub (https://github.com/ryanb/private_pub) to have a real time chat messages feature

            This application is hosted in Digital Ocean and chat messages have been working correctly for a long time. However, around 1 and a half month ago it stopped working and I got an error on the console that says: GET https://fake-url.com:9292/faye/faye.js net::ERR_CONNECTION_REFUSED

            First thing I did was to restart the Faye server using this command: bundle exec thin -C /data/app/shared/config/private_pub_thin.yml -d -P /data/app/shared/tmp/pids/faye.pid --ssl-disable-verify start (I run this command through Capistrano)

            After running that command I checked /data/app/shared/tmp/pids folder and confirmed that faye.pid is there so process seems to be running

            Then I ran sudo lsof -i -P -n | grep LISTEN to check open ports and 9292 port is listed

            After that I reloaded the chat and got again the net::ERR_CONNECTION_REFUSED error

            Then I checked the ports again and port 9292 does not appear on the list

            So it seems like everytime I load the pages it closes the port or something like that.

            NOTES:

            • ufw is not enabled
            • We have a staging server where we have the same problem. Only difference is that in staging port 9292 always appears on the list of open ports. However, it throws net::ERR_CONNECTION_REFUSED
            • I think this error started to happen after the old Let’s Encrypt Root Certificate expired (https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021) I am not 100% sure about this but I had other problems related to this and I wonder if this error is somehow related to that
            • It works fine locally

            Thanks in advance!

            ...

            ANSWER

            Answered 2021-Dec-29 at 14:21

            I ended up removing Private Pub gem and using Pusher to get the real time updates. Pusher was really easy to use. Thank you all!

            Source https://stackoverflow.com/questions/69981394

            QUESTION

            setup ROR application using puma nginx and capistrano
            Asked 2021-Dec-09 at 01:08

            I'm trying to deploy ruby on rails application to the Amazon EC2 instance, using puma as an application server, nginx server and capistrano for deployments. Currently I'm stuck with the error message:

            nginx logs are not showing any error,

            puma logs are also not showing what's the error

            I have verified that puma server is started and running, using the following command:

            ...

            ANSWER

            Answered 2021-Dec-09 at 01:08

            In my particular case it was due to the stopped REDIS service. The application was configured to utilize REDIS for caching, however REDIS service wasn't running. This wasn't reflected in the logs for some reason and I spent a good amount of time figuring out what was wrong.

            Source https://stackoverflow.com/questions/70176918

            QUESTION

            R: split-apply-combine for geographic distance
            Asked 2021-Nov-17 at 17:53

            I have downloaded a list of all the towns and cities etc in the US from the census bureau. Here is a random sample:

            ...

            ANSWER

            Answered 2021-Nov-12 at 22:48

            I have such a solution. And I'm surprised myself that I used two loops for!! Incredibly, I did it. First things first.

            My proposal is based on a simplification. However, the mistake you will make at short distances will be relatively small. But the time gain is huge!

            Well, I propose to count the distance in Cartesian coordinates, not spherical.

            So we're going to need a simple function that computes the Cartesian coordinates based on the two arguments latitude and longitude. Here is our LatLong2Cart feature.

            Source https://stackoverflow.com/questions/69915845

            QUESTION

            Capistrano/Puma : Unable to load application: ArgumentError: missing keyword: :root
            Asked 2021-Nov-16 at 14:29

            Rails 6, Mysql, Ubuntu 20.04 I would like deploy with Capistrano Puma.

            I have this error in my website :

            We're sorry, but something went wrong.

            If you are the application owner check the logs for more information.

            Error into my log : puma.error.log :

            ...

            ANSWER

            Answered 2021-Nov-16 at 13:59

            That error comes from a misconfigured storage.yml in your environment. You are missing the root key.

            For more information on how to set up ActiveStorage, read here.

            Source https://stackoverflow.com/questions/69987606

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install capistrano

            Add Capistrano to your project's Gemfile using require: false:.

            Support

            Capistrano is a large project encompassing multiple GitHub repositories and a community of plugins, and it can be overwhelming when you are just getting started. Here are resources that can help:. GitHub issues are for bug reports and feature requests. Please refer to the CONTRIBUTING document for guidelines on submitting GitHub issues. If you think you may have discovered a security vulnerability in Capistrano, do not open a GitHub issue. Instead, please send a report to security@capistranorb.com.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/capistrano/capistrano.git

          • CLI

            gh repo clone capistrano/capistrano

          • sshUrl

            git@github.com:capistrano/capistrano.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link