All threads / Deploy Ubuntu 20.04 Focal Fossa Discussion

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Deploy Ubuntu 20.04 Focal Fossa Discussion

Chris Oliver asked in General

Thanks for the guide. There is an error installing NGINX on Ubuntu20.04: "The following packages have unmet dependencies:
libnginx-mod-http-passenger : Depends: passenger (= 1:6.0.4-1~bionic1) but it is not going to be installed
Depends: nginx-common (< 1.14.1) but 1.17.10-0ubuntu1 is to be installed."
Maybe you can correct the installation commands.
Thank You.

You are attempting to install the version of Passenger for bionic beaver, 18.04. In there "Installing NGINX & Passenger" you need to use a different repository. Use: sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger-testing focal main > /etc/apt/sources.list.d/passenger.list' instead of sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger bionic main > /etc/apt/sources.list.d/passenger.list'. Also note this is still beta / testing for passenger, while it should work, the final version is expect to release in a couple more weeks.

Switch out this repository as mentioned above and rerun the commands form the installing passenger section -- this should allow you to install successfully.

Thank you very much.Nginx with your help successful installed.

Reply

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 API only mode? 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'"

require 'capistrano/bundler'
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!

SOLVED: ok, just in case anyone else runs into this issue it's because i had special characters in my postgresql password. you can escape them or remove them.

additionally, since i was running an api i definitely had to make those changes to my capfile i listed above.

Reply

Thanks for the tutorial. Deploys to the server fine but am getting an internal server error.

The application encountered the following error: uninitialized constant ApplicationCable::ActionCable
Did you mean? ActionMailer (NameError)

Any idea why this might be happening? I haven't touched anything with ActionCable in my app and it works great on dev.

Found the answer. I'm running Rails 6 webpacker only, so I removed sprockets. My config/application.rb had 'require action_cable' commented out. Added that and came across another issue.

cap's deploy:assets:backup_manifest was failing because it couldn't find the assets manifest file. Since I removed sprockets it doesn't exist.

I added Rake::Task["deploy:assets:backup_manifest"].clear_actions to my config/deploy.rb and now everything works. Going to do some research to make sure I didn't stop doing something I need by calling that. Its working for now

Reply
Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 37,344+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.