Good version to use in a production enviroment

Hi, we are setting up Ruby on Rails on a production server. Advice on what version of ROR and Ruby to use would be great. Obviuiously we want something stable and not too cutting edge.

Also advice on keeping it up to date, especially regarding secularity, would be great. We have great Linux sys Ops in terms of general security, its the ROR bit of the stack I am asking about.

Regards, Ben

Hey,

I think it’s safe to say that current newest stable releases (Ruby 2.4.1 and Rails 5.1.3) should work fine on production. Been running them for a while without any issues. Some production websites even run on Rails master (I think Basecamp is one of them).

In terms of future strategy, probably waiting a patch or two after minor/major releases is always a good idea. Read change logs, keep an eye on issue tracker and test updates on staging environment before updating production.

These are general guidelines that I use, but your milage may vary. Hope that helps.

Rolandas,

Thanks for that. Have setup a master/prod and dev branch/database. file structure is dev/eventtpuddle/ and prod/eventpuddle, with each having ‘lib’ etc in them. Was thinking of putting a rails directory in each to keep everything in the git tree. Does this make seance. I guess I need to point Apache at a directory under rails but currently have been concentrating on writing ruby scripts to populate the database so not started using rails yet. Just want to work out where stuff goes before I start.

I can use the dev for staging.

What is the easiest way of running two versions of ruby & rails, cant really go the VM route.

Ben

Thanks for that. Have setup a master/prod and dev branch/database. file structure is dev/eventtpuddle/ and prod/eventpuddle, with each having 'lib' etc in them. Was thinking of putting a rails directory in each to keep everything in the git tree. Does this make seance.

Not to me -- I'm really not sure what you're describing, but Rails has a standard file layout; going against convention isn't recommended if you're relatively new to Rails.

What exactly are you trying to do? Have you examined the default generated layout? What is it about that you have problems with?

What is the easiest way of running two versions of ruby & rails, cant really go the VM route.

I use `rvm` (Ruby Version Manager); some people use `rbenv`.

HTH,

Latest stable is Rails 5.1.3 and Ruby 2.4.1. I'd not try to use older versions... upgrading deprecated stuff in Rails is a PITA, and older Rubys are slower and coming to EOL for security patches anyway. I'm also on Linux. Using Apache+Passenger+PostgreSQL to deploy. You can safely update minor releases as you go as they are released without a lot of pain. Start with current stable releases and move from there.

Good luck! Hope this helps.

Phil

Latest stable is Rails 5.1.3 and Ruby 2.4.1. I’d not try to use older versions… upgrading deprecated stuff in Rails is a PITA, and older Rubys are slower and coming to EOL for security patches anyway. I’m also on Linux. Using Apache+Passenger+PostgreSQL to deploy. You can safely update minor releases as you go as they are released without a lot of pain. Start with current stable releases and move from there.

So Passenger works with RVM in Apache?

I think I am going with MariaDB (mysql). Curious why you chose PostgreSQL?

Good luck! Hope this helps.

Yes a lot. Ben