1

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

Michael Durrant
  • 93,410
  • 97
  • 333
  • 497
Hunter Jansen
  • 25
  • 2
  • 6

2 Answers2

4

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.

Michael Durrant
  • 93,410
  • 97
  • 333
  • 497
  • I was afraid that was going to be the answer, but thank you. It's pretty much something I'm doing in my off time to learn the language. I use heroku as a 'staging' site to make sure everything's working before I commit my changes. It's great and super easy to deploy to, for sure. However, I'm a crazy poor college student(thus the dreamhost account) so I can't really afford to host a real site at heroku, unless there's a way to have my dreamhost domain name point to my heroku site, which I may have to look into. Thanks again for the insight. – Hunter Jansen Sep 11 '12 at 00:18
  • Ah well it's for learning then 1.9 is definietly where you want to be be. No point learning new stuff on old versions, that's not going to serve you well. Don't forget that with heroku's free plan you can point it to your own domain - https://devcenter.heroku.com/articles/custom-domains - and that can be registered with many domain name regitrants for few dollars. Please avoid goDaddy though. – Michael Durrant Sep 11 '12 at 00:54
0

You could go with Heroku, which is free until you start adding more dynos and workers. Another option, depending on your needs might be Webfaction. They support up to 1.9.3 and has the ability to customize your own box.

Leo Correa
  • 19,131
  • 2
  • 53
  • 71
  • I think I might need to take a deeper look into heroku, as it's all everybody is suggesting. As far as I'm aware I should be able to get by with the free account. Thanks for your feedback! – Hunter Jansen Sep 11 '12 at 00:29
  • No problem, Heroku is very easy to deploy (uses git) and it works great for webapps. It does get a bit expensive when you start adding dynos and workers. Its not meant for a simple website as it tends to be a bit slow on the warm up. I suggest webfaction if your project is a simple website. – Leo Correa Sep 11 '12 at 00:52