Question

I have an app written with Ruby 1.9.3 with Rails 3.2.6. After the fact I'm deploying on Bluehost, no choice here, who has Ruby 1.8.7 on the server.

I'm getting the different time format error on my gems. I can edit them on the server but next time I do a cap deploy I'm going to wipe the changes and have to do it again. BH let me upgrade Rails to 3.2.6 from the command line but I can't upgrade to Ruby 1.9.

  1. Can I upgrade the server or am I going to have to rewrite my app with Ruby 1.8?
  2. If I do rewrite will I have to do it again when they upgrade all of their servers to 1.9?

I have called and done live chat with BH and they always send me to the set up page for new apps.

Was it helpful?

Solution

First of all, if the App runs on 1.8.7 it will (most likely) run on 1.9.x aswell.

The other way around is a bit harder... Rails 3.2.x is the last Version of RoR to support Ruby 1.8.7. But unless you used --old-style-hash when creating, you'll have quite some work to do.

Depending on how complex your code is, it may be enough to fix all hashes:

# Ruby 1.9:
hsh = { foo: "bar" }

# Ruby 1.8 and 1.9:
hsh = { :foo => "bar" }

OTHER TIPS

You must rewrite your app to Ruby 1.8. Most shared web hosts do not use Ruby 1.9 yet, or I haven't found one at least. So you must develop to the specifications of the server you're deploying to. Most shared web hosts have no clue how to deal with Ruby; PHP and Perl, and the like, have been around a long time in the server environment and are well understood—but Ruby is still somewhat new.

Or, you could find a better/VPS host. I've eyed prgmr.com as a budget way to learn managing a VPS environment (I'm not affiliated with them), but I have a VPS on Linode I don't need their services.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top