Due to a number of issues, my app is currently stuck in Rails 1.2.6-land. Converting it to Rails 2.3 is planned, but will be awhile.
Question: Does current Passenger support Rails 1.2.6? I've heard different things.
I'm currently using nginx and mongrels but 'dem dogs are getting tired.
Thanks!
Larry
Yes it does, we are in 1.2.6-land as well and using passenger for staging and dev servers.
Related
I have a few Rails apps, each running on their own server. They run under Passenger-apache, and currently under ruby 1.9.3. Currently, they run under a ruby installed and managed with rbenv.
I'd like to upgrade them all to ruby 2.2.x. As long as I'm doing this, I'd like to upgrade them from passenger 4.x to 5.x as well.
Let's assume I've tested them all on my development box and am confident they run fine under ruby 2.2.
As I think through this, I get very confused about the best way to do this -- especially with minimal production downtime.
I guess I'd start out by installing ruby 2.2 under rbenv, which theoretically shouldn't disturb the running apps. Passenger is installed under a particular ruby, but then has the option of running apps under different rubies. Should I install the latest passenger first, under the new ruby 2.2, but configured to run the existing apps under the old ruby? And then upgrading the apps to the new ruby... I guess involves running bundle install again, to get all dependencies installed under the new ruby?
Or something else entirely? Is there a way to do this that is relatively safe, and will have limited or zero downtime for my apps?
Has anyone done this before? I'm fairly familiar with all the pieces already, and can brainstorm possible approaches myself, but when I start, there are too many places where I'm not sure what the best approach is. What I could really use is advice from someone who has already done this, or is otherwise pretty sure that what they recommend will work as they say -- not just guesses about things you haven't done that might work. Thanks!
Make sure that your applications work under the new ruby version. I have had some legacy Rails 3.2.x applications that works up to ruby 2.1.5, but breaks in ruby 2.2.x. You should be fine with updating your ruby and passenger versions.
Since each application runs on their own server, you don't have to really worry about running multiple versions of passenger. You should be able to install the new version ruby on each server, install the gems, update apache to the newer passenger and restart apache to have everything take effect. Worst case, you can clone your servers to a virtual environment and test everything prior to doing it on production. This would help you minimize downtime as you would have any workarounds and/or research of bugs done prior to touching the production environment.
I want to run multiple rubies on our production server. We have some ruby 1.9.3 rails 3.2 sites going live as well as keep older 1.8 sites. I understand that Passenger 3.2 will be able to do this natively but isn't live yet.
So for now, is this the best way to do this?
http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/
The apache passenger module can't do this. You could however run passenger standalone for each app (with a different ruby version) and then proxy from apache to passenger standalone.
You could of course also proxy to unicorn, thin etc.
What about using multiple VMs/Slices for your different versions of ruby and rails, that way you have more control of your enviroment and don't have to worry about your different rubies/rails causing headaches with each other.
EDIT
Another solution that I have heard of but haven't tried is setting multiple users and running each version of ruby/rails per a different user
I am an absolute newbie to web development and ruby on rails. I am planing to deploy a ror application on the Linode 512 plan. My website would be basically a forum that allows users to upload photos using Ruby 1.9.3 and Rails 3.2.
Which OS should I use? What are their difference? (Ubuntu / Debian / CentOS / Fedora)
Should I use Apache or Nginx? What are their difference?
Should I use PostgreSQL, MySQL, MongoDB or any other kinds of DB provided on Linode? What are their difference?
My target audience would come from China which means I can't use Amazon S3. Should I let the users upload the photos to the Linode server?
Is there any step-by-step beginner‘s guide for this issue?
Thx
First of all, I think you are worrying too much. If you are a newbie, just follow the popular choice for a start, then change, modify, scale as you go. As your skills mature, you will know what best suites you.
Below are some choices that will be easier for you:
Which OS should I use? What are their difference? Ubuntu
Should I use Apache or Nginx? What are their difference? Apache. If it is a small website, it doesn't matter for now.
Should I use PostgreSQL, MySQL, MongoDB or any other kinds of DB provided on Linode? What are their difference? MySQL. MongoDB is a NoSQL database, may not be for you for the moment.
My target audience would come from China which means I can't use Amazon S3. Should I let the users upload the photos to the Linode server? Upload to Linode for now. Don't scale it prematurely.
Is there any step-by-step beginner‘s guide for this issue? Ryan's RailsCasts: http://railscasts.com/episodes/373-zero-downtime-deployment and http://railscasts.com/episodes/335-deploying-to-a-vps, they are must-watch, but not free.
For all these setup, Linode's tutorial is good for a start. You should look at #Stefan answer too.
You should also try to deploy to Heroku just to get a feel of it. Rails Tutorial is good for you to learn up from development to deployment.
There are several dedicated Rails setup guides on Linode:
Apache and Passenger:
Ruby on Rails with Apache on Debian 6 (Squeeze)
Ruby on Rails with Apache on Ubuntu 10.04 (Lucid)
Ruby on Rails with Apache on Ubuntu 10.10 (Maverick)
nginx and Passenger:
Ruby on Rails with Nginx on Ubuntu 10.04 (Lucid)
Ruby on Rails with Nginx on Ubuntu 10.10 (Maverick)
Ruby on Rails with Nginx on Debian 5 (Lenny)
Ruby on Rails with Nginx on CentOS 5
As we have many linode deployment for rails apps my recommendation would be:
ubuntu/centos + mysql/postgres + nginx + passenger
If your application is going to have huge fb inout operations then you can mongodb as choice
Could someone offer some advice please.
I have a first revision of an application that I developed under rails 3.1 and ruby 1.9.2. It wasn't until I came to deploying the application that I discovered my shared host does not support ruby 1.9.2 (most shared hosting seems to be the same). I tried to deploy my rails 3.1 application anyway, but have encountered many problems, often to do with the deprecated => syntax.
I am now trying to figure out what to do, and am thinking of recreating my application under an earlier version of rails.
What are my options?
What version of rails should I downgrade to, to avoid the problems I have been having?
thanks.
I would use RVM to install your own Ruby 1.9.2. See https://rvm.io/rvm/install/.
You could give heroku a try. They have a free tier and I believe the Cedar stack supports rails 3.1
Deploy to Heroku or CloudFoundy. They support ruby-1.9.2.
Once a year or so, I need to update a few rails apps. This means that while I know the ruby language... I forget and don't keep up with the best practices of setting up the rails environment on osx 10.6.7. In the past year I got a new mbp... so I need to reconfig everything. One of the apps is 2.0.2 and two other apps are 2.3.x... so I'd like to also upgrade these as I make changes to them. I've heard good things about homebrew and pow so I installed those. And all would be well if I was writing a new app from scratch... but how do I run a rails v.2.0.2 app with this setup?
There is no way to run a rails 2.0.2 app with pow, unfortunately. Pow is a tool for running rack apps, and rails wasn't build on top of rack until version 2.3.