29 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]/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. after i deploy everything im still getting only a Nginx 404. Am i doing anything wrong? Not seeting any errors when reloding nginx

  3. Oh… I encountered the same ruby version problem But i'm stupid… Not viewed error.log Always looking for the wrong answer… Thanks

  4. There are no Phusion Passenger-served applications running whose paths begin with [$PATH]. I am getting this error. I am using a VM on azure

  5. 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


  7. every time i pause this, the youtube controls cover up the line i'm trying to read (the one you're typing). please add some space next time.

  8. 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

  9. 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.

  10. 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.
    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 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 *