How to run rails application cloned from github in digitalocean?

294 views Asked by At

I used the one-click setup from digitalocean to setup an "Ubuntu Ruby on Rails on 14.04 (Postgres, Nginx, Unicorn)" server.

I successfully cloned and bundle install and migrate my database. However, when I run my server using 'rails s'. I can't seems access it from port 3000.

I am suspecting it has something to do with the pre-configuration digitalocean has setup.

does anyone knows the proper way to do this?

1

There are 1 answers

0
klaoha06 On

ok i figured it out

  1. make sure to create /home/index.html and point your route there before you push to git
  2. install git apt-get install git
  3. ssh to your digitalocean domain
  4. navigate to cd /home/rails
  5. delete folder rails
  6. clone your rails repo from github git clone YOUR_REMOTE_ADDRESS
  7. rename the downloaded repo to rails
  8. setup your db rake db:drop db:create db:migrate
  9. run rails server like so rails s --binding=YOUR_IP_ADDRESS
  10. go your your browser and input your ip plus ":3000"

I was running rails s for the past few days wondering why it is just showing the default "digitalocean rails page"

anyways, i hope this could help someone in the future.