开发者

Error using mongrel 1.2.0.pre2 in rails 3 app on 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开发者_Python百科 '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.


Try running bundle update daemons


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!


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜