views:

63

answers:

2

I have used Heroku to push up my already coded Rails applications.

But now I wonder how the workflow would look like if I start coding a new Rails application from scratch.

For example if I use their addons (MongoHQ, Redis, Websolr, Sendgrid etc) in my application code, then I guess I shouldn't install MongoDB, Redis, Solr, Mail server etc in my local environment since they won't work with my code, correct?

So that means I have to push my app up to the Heroku platform to be able to run it in the web browser. That means, after a change of lines I have to commit and push it up.

If I'm correct, isn't this time-consuming since before I just changed the code and I could see the results in the browser immediately. Now I have to push for every change I want to see in browser.

+2  A: 

You can install all of these locally - you should only need to specify different configurations when you are running in production rather than development.

For example, with Websolr, adding the following line in your initializer:

Sunspot.config.solr.url = ENV['WEBSOLR_URL'] if ENV['WEBSOLR_URL']

Will allow it to work both locally and on Heroku. See the docs for more information.

Mr. Matt
Worth noting also: the Sunspot gem provides a `sunspot-solr` command for use in development mode.
Nick Zadrozny
+1  A: 

I can't tell for all addons, but the ones I used have very good fall-back mechanism for local deployment in development mode.

For example, Sendgrid will detect when you're using ActionMailer and send emails for you. You don't have to configure or call anything in your code. Locally you send emails as before (through sendmail or smtp server)

Same with exceptional (although you can invoke its API directly).

MongoHQ... Isn't it supposed to be replacement for PostgreSQL? Then, you should not care in most cases, just like you don't care about PostgreSQL running and not MySQL.

Nikita Rybak