ryanb/private_pub — Issue #29: PrivatePub does not work in production if RAILS_ENV is not set.
Author: Antek-drzewiecki
Created: 2012-01-23 21:04:26+00:00
State: open

Hello,

I'm new to github, rails and ruby. But before i'd make a pull request i'd like to start a discussion, to see your comments. Basically i dont know if its a real issue. When running in development mode, all goes fine. The RAILS_ENV is set to development and the private_pub gem runs fluent and the publishing and subscribing can begin.

Now in production mode if your RAILS_ENV is not set. The application will run in production mode, but your faye server will run in development experiencing "Incorrect signature." messages. Since rack does not pass the thin -E production params. A solve is to export your RAILS_ENV in the termial.
```export RAILS_ENV=production```
or when using bundler starting the gem with
```RAILS_ENV=production bundle exec rackup private_pub.ru -s thin -E production```

I wish to commit this to the readme but i'd like to know how you guys would solve this problem.