0

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.

Community
  • 1
  • 1
yellowreign
  • 3,528
  • 8
  • 43
  • 80
  • If you're on the Cedar stack, what's in your Procfile? https://devcenter.heroku.com/articles/procfile – mylescarrick May 03 '12 at 23:32
  • I didn't upload a Procfile yet, I was just going to have what Heroku recommended web: bundle exec thin start -p $PORT -e $RACK_ENV. Trying to get the bundle install to work first https://devcenter.heroku.com/articles/cedar-migration – yellowreign May 03 '12 at 23:49
  • you don't need a procfile if you're only running a web process, Heroku autodetects it and does it for you. – John Beynon May 04 '12 at 07:06

2 Answers2

0

It looks like 1.0.0.beta.4.1 is only available on win32 based architectures (http://rubygems.org/gems/eventmachine/versions). Your Heorku dynos are ubuntu 64-bit based. Try the following:

gem "thin", "1.3.1"
gem "eventmachine", "1.0.0.beta.4.1", :group => [:development, :test]
Glenn Gillen
  • 471
  • 2
  • 7
  • When I do that, I get the error: "could not find gem 'eventmachine (=1.0.0.beta.4.1)' in any of the gem sources listed in your Gemfile'" This happens even though I already installed the gem using 'gem install eventmachine --pre'. It also happens when I remove the :group... part – yellowreign May 06 '12 at 20:36
0

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.

yellowreign
  • 3,528
  • 8
  • 43
  • 80