I’ve built a rails app on my local host using Ruby 1.9.3, it works great and does everything it’s supposed to do locally. However, I’m using dreamhost as a cheap host for this app and it turns out that their install of passenger only supports up to 1.8.7.
This is a bit of a problem, since there’s a lot of files that use the “key: value” syntax that’s afforded by 1.9 as opposed to the classic “:key=>value” syntax of older rails versions. So my question is, is there any way to quickly change all these syntax issues or am I stuck manually going through the files to make any necessary changes?
Thanks in advance
You can globally search and replace using the command line and various IDE’s, but I recommend you don’t.
The reasons being:
Most gems these days work with 1.9+ so you may have problems there.
Most guides and tutorials now assume 1.9+
Both ruby and rails move rapidly. Rails 4 will be out soon as Ruby 2.0 is around the corner. Get used to quickly changing versions is my recommendation. I came from a much more stable background and this was a big change for me.
You’ll feel silly in 2 or 3 months when you decide you need to… upgrade to 1.9
There plenty of hosts that support ruby 1.9, heroku being the best and most well-known. Heroku starts plans start with a free one, so you can’t beat that for price! For paid plans – If your efforts take 8 hours and you save $80 you are paying yourself $10 an hour, i.e. close to minimum wage.