Question

Why can I only view default "Yay! You're on Rails!" page?

I used the One-Click Install for a Rails app. Everything appears to have gone smoothly.

So I created a folder side-by-side with the /home/rails/example app and updated /etc/nginx/sites-available/rails (and thereby sites-enabled too) to point at my folder instead of example.

I then setup my secret_key_base, and ran the command bundle exec rake assets:precompile db:migrate RAILS_ENV=production

Rebooted the server, effectively, to ensure all changes would pick up. But when accessing my site by the IP address, it still shows that default “Yay! You’re on Rails!” page.

I’m not sure what I’m overlooking and would love if someone could point me in the right direction.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Do this:

  1. Remove the IP from your nginx vhosts (159.65.238.194). Leave the subdomain there. Restart Nginx

  2. Stop the rails service: systemctl stop rails.service

  3. Start rails from your new app’s folder like this:

cd /home/rails/vault
rails server
  1. In your /etc/hosts, remove this line
127.0.1.1 vault2.ifrog.com vault
  1. Try http://vault2.ifrog.com

This comment has been deleted

    Are both your vhosts configured to use the server’s IP address? If so, Nginx will route all visits to the first vhost in its configuration (sites-available/rails). You’ll need to define actual domain names in both vosts sites-available/rails for both vhosts. It doesn’t have to be a registered domain name, it can be one you define in in your local PC in /etc/hosts for example.

    Or comment out the “example” app and then Nginx will default to your own app from then on.

    Try DigitalOcean for free

    Click below to sign up and get $200 of credit to try our products over 60 days!

    Sign up

    card icon
    Get our biweekly newsletter

    Sign up for Infrastructure as a Newsletter.

    Sign up
    card icon
    Hollie's Hub for Good

    Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

    Learn more
    card icon
    Become a contributor

    You get paid; we donate to tech nonprofits.

    Learn more
    Welcome to the developer cloud

    DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

    Learn more ->
    DigitalOcean Cloud Control Panel
    Get started for free

    Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

    New accounts only. By submitting your email you agree to our Privacy Policy.

    © 2023 DigitalOcean, LLC.