I need to set up a dedicated server for a Rails app. I am not sure what is the best approach for this. I need a solution that can scale with lots of users signing up on a site. I guess it would be a medium-scale application.
Here are more specific questions:
One related question, though not related to this post directly: I typically always install one ruby system-wide using sudo, and install packages like libssl or whatever, and then install the others using rvm without sudo. Is this the correct way, or can i directly install all rubies i need with rvm without one installed system-wide as well?
I was in this same predicament only last week, the solution I took was to follow Railscasts #335 Deploying to a VPS
Ryan Bates walks you through the tricky steps of deploying to a VPS though, I have deployed to a dedicated server I set up at home to learn the deployment process.
He uses the following setup:
Personally, I am better equipped for MySQL and so easily used that in place of PostgreSQL. I also used Ubuntu 12.04.
Admittedly I did pay the $5 subscription. But to be honest the trickier parts of deployment are also covered in more depth on other tutorials. He gives you source code and clues you up on other aspects such as good tools (such as the rbenv-installer).
This also got me using rbenv rather than RVM as I had been using previously and so far i have had no issues with it.
One thing I did trip up on though and had to find some external input on was unicorn but this post along with the Railscast on Capistrano helped me nail it.
Good luck
Use RVM. See http://beginrescueend.com/integration/passenger/ .
I would use Nginx and Passenger -- Passenger is incredibly easy to set up, and Nginx is nice and lightweight.
Postgres is way better than MySQL in nearly every respect. Good choice.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With