25 thoughts on “Deploy Ruby on Rails To Production in 2019

  1. I'm having an issue at the end of deployment. I get this error:

    00:07 deploy:assets:precompile
    01 $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile
    01 rake aborted!
    01 URI::InvalidURIError: bad URI(is not URI?): postgresql://deploy:[email protected]127.0.0.1/my-api-prod

    Is there an issue with me using rails as an API? If so, I tried this according to a github issue I found:

    In Capfile you add these lines (but it fails on migration after getting thru precompile) –

    removed "require 'capistrano/rails'"
    add require 'capistrano/bundler'
    add require 'capistrano/rails/migrations'

    I'm wondering if there's some general knowledge I'm missing that's preventing me from having a successful deployment. Any tips would be greatly appreciated!

  2. sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev dirmngr gnupg apt-transport-https ca-certificates redis-server redis-tools nodejs yarn

  3. Hello, I am unable to create .rbenv-vars file, when I run vim ~/blog/.rbenv-vars I get the message "~/blog/.rbenv-vars" is a directory in the vim editor. Any help would be appreciated, thank you

  4. Hmm, this isn't working for me in rails 6 with webpacker. I keep getting: '** DEPLOY FAILED' and last couple of errors I'm getting are:

    ' DEBUG [75bb2c89] Compiling…
    DEBUG [75bb2c89] Compilation failed:'

    Any ideas? However, compilations works in development.

  5. Hello
    At first thank you for your nice tutorials. and this works fine for me.
    but now i want to add SSL to my site, and i am following this tutorial.
    https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-18-04
    and in this tutorial, we have to add the following line of code.
    sudo nano /etc/nginx/sites-available/example.com

    server_name example.com http://www.example.com;

    the question is where should i put that code, as we have only default file inside sites-available folder.

    Thank You

Leave a Reply

Your email address will not be published. Required fields are marked *