在heroku上的rails 3应用程序中使用mongrel 1.2.0.pre2时出错

发布于 2024-12-04 01:42:08 字数 767 浏览 1 评论 0原文

我正在从谷歌进行身份验证,并收到请求太长错误,因此经过一些研究,我添加了mongrel gem。这修复了我本地计算机上的请求太长错误。

但是,现在当我推送到heroku时,我不断收到以下错误

您已经激活了守护进程 1.1.0,但您的 Gemfile 需要 守护进程 1.0.10。考虑使用捆绑执行。 (宝石::加载错误)

Gemfile:

gem 'pg'
gem 'compass', '>= 0.11.5'
gem 'fancy-buttons'
gem 'haml', '3.1'
gem "nifty-generators", :group=>:development
gem "bcrypt-ruby", :require => "bcrypt"
gem "jquery-rails"
gem "devise"
gem "omniauth"
gem 'oa-openid', :require => 'omniauth/openid'
gem 'mongrel', '1.2.0.pre2'

也许从 gemfile 中取出 mongrel 可能会解决手头的问题,但是当我从谷歌进行身份验证时,我会再次出现“请求太长”错误。

有解决方法吗?我应该使用不同的版本吗?如果是的话...哪一个?

我在本地运行了bundle exec,尽管heroku 在部署之前在其端运行了它。

I am doing authentication from google and was getting request too long error so upon some research I added the mongrel gem. This fixed the request too long error on my local machine.

However, now when I push to heroku, I constantly get the error below

You have already activated daemons 1.1.0, but your Gemfile requires
daemons 1.0.10. Consider using bundle exec. (Gem::LoadError)

Gemfile:

gem 'pg'
gem 'compass', '>= 0.11.5'
gem 'fancy-buttons'
gem 'haml', '3.1'
gem "nifty-generators", :group=>:development
gem "bcrypt-ruby", :require => "bcrypt"
gem "jquery-rails"
gem "devise"
gem "omniauth"
gem 'oa-openid', :require => 'omniauth/openid'
gem 'mongrel', '1.2.0.pre2'

Perhaps taking mongrel out of the gemfile might fix issue at hand but then I would again have 'request too long' error when authenticating from google.

Is there a workaround to this? Should I be using a different version? If so...which?

I'v ran bundle exec locally even though heroku runs this on their end before deploying.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

凉城 2024-12-11 01:42:08

尝试运行捆绑更新守护进程

Try running bundle update daemons

拥醉 2024-12-11 01:42:08

遵循建议,我在heroku堆栈上迁移了ruby版本: heroku stack:迁移bamboo-ree-1.8.7。我必须通过提交临时文件来“欺骗”git 来推动这一更改——毫无疑问,有更好的方法来做到这一点!

Following advice I migrated ruby versions on the heroku stack: heroku stack:migrate bamboo-ree-1.8.7. I had to 'trick' git into pushing this change by committing a temporary file - no doubt there's a better way to do this!

扬花落满肩 2024-12-11 01:42:08

听起来您只在本地计算机上遇到问题,而在部署 Heroku 时则没有,对吗?

Heroku 使用 Thin 作为网络服务器,我也强烈建议在本地使用。

Mongrel 从未真正跳转到 Rails 3.x。默认的 Web 服务器 Webrick 并不是真正的行业实力,如果它有“请求太长”等怪癖,我不会感到惊讶。

添加 thin gem 到您的 Gemfile

按如下方式启动服务器:

rails s thin

您应该可以巡航了。 Thin 的启动速度也更快,并且可以处理多个连接。

It sounds like you have the problem only on your local machine, not on Heroku when it's deployed, correct?

Heroku uses Thin as webserver, and I highly recommend that locally, too.

Mongrel never really made the jump to Rails 3.x. And the default web server, Webrick, is not really industry strength, and I wouldn't be surprised if it had quirks like "request too long," etc.

Add the thin gem to your Gemfile.

The launch the server as follows:

rails s thin

And you should be cruising. Thin is also faster to start and handles multiple connections.

内心旳酸楚 2024-12-11 01:42:08

我认为这里有 3 个问题:

  1. 你正在使用 Mongrel,正如 @Wolfram 提到的那样,这不是一个好主意。将 Thin 添加到您的 Gemfile 中,将其捆绑,然后将其与您正在使用 Mongrel 的“rails Thin”一起使用

  2. 您可能在 Gem 版本中制作了一个小模组,它说您已经激活了一个版本,然后您又激活了另一个版本。不要忘记捆绑安装然后推送它

  3. 也许不仅更新 Bamboo 堆栈更好,而且将 Cedar 与“heroku create --stack cedar 一起使用。

I think 3 problems here:

  1. you're using Mongrel, as @Wolfram mentioned it's not a good idea. Add Thin to your Gemfile, bundle it, then use it with "rails s thin"

  2. you made a little mod in Gem version probably, and it says you've activated a version then you've activated another one. Don't forget to bundle install then push it

  3. Maybe it's better not only to update Bamboo stack but to use Cedar with "heroku create --stack cedar.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文