Ruby on Rails,捆绑部署 dreamhost
在安装带有博客插件的refinerycms后,我在Dreamhost上遇到了一些乘客问题。机架刚刚发生故障,没有任何有关该设备的信息 问题,它只说“...请检查服务器日志...”和堆栈跟踪 没有任何有关错误的消息。
一段时间后尝试重新安装但失败,运行时遇到同样的问题。我终于通过执行两个步骤使其工作:
1)bundle install --deployment ==>现在它显示有关机架版本差异的错误,我需要 1.2.4,但配置的是 1.2.1。 (我之前做过“捆绑安装”,但没有解决机架问题)
2)我用谷歌搜索并将我的 Gemfile.lock 更新到 1.2.4 它的工作原理......就像魔法......
有人可以向我解释一下:
- “bundle install --deployment”与 “捆绑安装”?
- “Gemfile”和“Gemfile.lock”有什么不同?
- 知道为什么如果我像上面那样它会起作用吗?
多谢
I ran into some problem with passenger on Dreamhost after installing refinerycms with its blog plugin. The rack just failed without any information about the
problem, It only said "... please check the server log ... " and a stack trace
without any message about the error.
After a while trying to reinstall but failed, running in the same problem. I finally have it work by doing 2 steps:
1) bundle install --deployment
==> It now shows the error about the differences in Rack version, my required 1.2.4 but it's 1.2.1 configured.
( I did 'bundle install' before but not solve the problem of rack )
2) I googled and update my Gemfile.lock to 1.2.4
AND IT WORKS ... LIKE MAGIC...
Can someone explain to me :
- what did "bundle install --deployment" do differently from
"bundle install" ? - What's "Gemfile" and "Gemfile.lock" different ?
- Any idea why It would work if I do like above ?
Thanks a lot
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
关于#3,Dreamhost 基本上需要rack 1.2.1,您通常可以通过在 Gemfile 中包含这样一行来设置它:
我假设将版本破解到 Gemfile.lock 中是有效的,因为它已经安装在系统上,所以您的应用程序能够毫无问题地加载它。但最好在 Gemfile 中指定它。
在 Dreamhost 上运行基于机架的应用程序可能需要一些尝试。如果您仍然遇到问题,您可能需要发布有关您的配置的更多详细信息以及您遇到的任何特定错误。
Regarding #3, Dreamhost basically requires rack 1.2.1, which you would normally set by having a line like this in your Gemfile:
I assume that hacking the version into Gemfile.lock works because it is installed on the system already, so your app is able to load it without any problems. But it would certainly be better to just specify it in your Gemfile.
Getting rack-based apps running on Dreamhost can be a bit of a trial. If you continue to have problems, you will probably need to post some more details about your config and any specific errors you're getting.