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.
我有一个用Ruby 1.9.3和Rails 3.2.6编写的应用程序。事实上我在Bluehost上部署,没有选择,谁在服务器上有Ruby 1.8.7。
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.
我的宝石上出现了不同的时间格式错误。我可以在服务器上编辑它们,但是下次我进行上限部署时,我将擦除更改并且必须再次执行此操作。 BH让我从命令行升级Rails到3.2.6但我无法升级到Ruby 1.9。
- Can I upgrade the server or am I going to have to rewrite my app with Ruby 1.8?
- 我可以升级服务器,还是要用Ruby 1.8重写我的应用程序?
- If I do rewrite will I have to do it again when they upgrade all of their servers to 1.9?
- 如果我重写将在将所有服务器升级到1.9时再次执行此操作吗?
I have called and done live chat with BH and they always send me to the set up page for new apps.
我打电话给BH做了实时聊天,他们总是把我送到新应用的设置页面。
2 个解决方案
#1
1
First of all, if the App runs on 1.8.7 it will (most likely) run on 1.9.x aswell.
首先,如果App在1.8.7上运行,它(很可能)也会在1.9.x上运行。
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.
反过来又有点困难...... Rails 3.2.x是支持Ruby 1.8.7的RoR的最后一个版本。但是除非你在创建时使用了--old-style-hash,否则你还有很多工作要做。
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" }
#2
0
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.
您必须将应用程序重写为Ruby 1.8。大多数共享Web主机尚未使用Ruby 1.9,或者我至少没有找到它。因此,您必须根据要部署的服务器的规范进行开发。大多数共享Web主机都不知道如何处理Ruby; PHP和Perl等已经在服务器环境中存在了很长时间并且很容易理解 - 但Ruby仍然有点新鲜。
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.
或者,您可以找到更好的/ VPS主机。我把prgmr.com看作是学习管理VPS环境的预算方式(我与他们没有关联),但我在Linode上有一个VPS,我不需要他们的服务。
#1
1
First of all, if the App runs on 1.8.7 it will (most likely) run on 1.9.x aswell.
首先,如果App在1.8.7上运行,它(很可能)也会在1.9.x上运行。
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.
反过来又有点困难...... Rails 3.2.x是支持Ruby 1.8.7的RoR的最后一个版本。但是除非你在创建时使用了--old-style-hash,否则你还有很多工作要做。
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" }
#2
0
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.
您必须将应用程序重写为Ruby 1.8。大多数共享Web主机尚未使用Ruby 1.9,或者我至少没有找到它。因此,您必须根据要部署的服务器的规范进行开发。大多数共享Web主机都不知道如何处理Ruby; PHP和Perl等已经在服务器环境中存在了很长时间并且很容易理解 - 但Ruby仍然有点新鲜。
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.
或者,您可以找到更好的/ VPS主机。我把prgmr.com看作是学习管理VPS环境的预算方式(我与他们没有关联),但我在Linode上有一个VPS,我不需要他们的服务。