Search code examples
ruby-on-rails-3herokueventmachinethin

Thin Gem Won't Work on Heroku


I'm moving from the Bamboo stack to the Cedar one on Heroku, but I'm running into issues trying to run the Thin gem on Heroku. Locally, I'm running Windows Vista, but I have the same error mentioned in the comments here,

When I add the Thin gem to my gemfile, it tries to install eventmachine

(1) When I add gem "thin" to my gemfile, I receive an error because it can't install eventmachine 0.12.10. Also, when I try to commit it to Heroku I receive an error because thin isn't installed locally.

(2) When I add these gems, as indicated here:

(I've tried putting this in a group :production do block and without, and in neither case did it work)

gem "thin", "1.3.1"
gem "eventmachine", "1.0.0.beta.4.1"

I receive an error indicating that that eventmachine version can't be found.

(3) When I add the gem manually it installs.

gem install eventmachine --pre

However, even when I add the Thin gem, it still wants to install the 0.12.10 version of eventmachine, even if I try to specify the 1.3.1 Thin version mentioned here.


Solution

  • I was able to get help from Heroku. It turns out I just had to do:

    group :production do gem 'thin' end

    and then, instead of

    bundle install
    

    you run

    bundle install --without production
    

    Of course this doesn't help if you want to run Thin locally, but for me, Web Brick is fine in development.