I have a rails application that works fine on my local machine when I run
However I am having trouble getting it working on DO. The exact commands I have run are as follow
#create droplet with ubuntu and 1-click rails application #open up server's console via ssh or online console rm -rf /home/rails/* apt-get install git cd /home/rails git init git remote add origin MY_GIT_REPO git pull origin master #must add swapfile for bundle install to work fallocate -l 512M /swapfile chmod 600 /swapfile mkswap /swapfile swapon /swapfile #make swapfile permanent nano /etc/fstab # add this line to bottom of file --> /swapfile none swap sw 0 0 #back to the rails stuff bundle install #switch from sqlite to mysql2, eventually (note I have not done this yet) #need to add mysql2 to gemfile and edit config/database.yml using https://gist.github.com/erichurst/961978 bundle exec rake db:create db:schema:load db:seed nano config/environments/production.rb # Set `config.assets.compile = true` chown -R rails:www-data * service unicorn restart exec bundle rails s -d
After I run this it appears my IP is up and running (there’s no error shown), but my index page is not shown. Thanks for the help!
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!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!