I apologize in advance for the fairly simple question.
I am familiar with PHP, but am trying to install this Ruby script on my server for the first time. It’s an open source script that I’ve forked from github, but unfortunately does not have any instructions. I have Ruby on Rails, and MongoDB installed already.
Does anyone know what the beginner steps are to get started? Should I upload everything via FTP to the public directory, or is there something else to this?
Most Rails projects are much better served by having a proper deployment strategy. Typically this involves making your own repository, easily done by forking that existing application, and cloning that on to your server using
git. To make changes in the future, do your work on a development copy, push that into the repository, and pull down the changes on the server.Unlike PHP where many parts of the application can function independently, Rails applications tend to be far more integrated and uploading it piece by piece is not going to work in the long run.
Rails applications can run stand-alone using the provided
rails servertool but this is really only intended for light-duty testing or development work. A more permanent solution is to use something like Passenger to do the hosting for you.Passenger will take care of launching your application when calls are made to the site you’ve configured in Apache or nginx, depending on which you end up using. Passenger is popular because it’s quite easy to get running.
There are other approaches like unicorn if you’re feeling more adventurous.
When you make changes to your Rails application in production mode you will have to create a
tmp/restart.txtfile in the main application directory to tell your web server to restart the process. This is not a requirement in development mode.Due to the relative complexity of this process once you include all the various steps, you will probably want to use a deployment automation tool like capistrano.