Closed vardhan-nyros closed 12 years ago
That is possible only if the other application's database allows ingress (and if that's the case, you may not need this gem). Which database plan is the other app using?
Hi,
Thanks for the quick reply. My requirement is that I have two apps in heroku (app1 & app2) as such the app2 is upgraded version of app1 with increased requirements.So, I need to switch users from app1 to app2 depending upon the users choice (switch new(old)) simultaneously.
Is this be possible with this gem or do we have any other alternative. Kindly suggest me as I am a new bee to rails.
Thanks, Sai
Both the applications use the shared databases and the application resides in heroku.So, they use postgres DB
Heroku's shared database plan doesn't support ingress. I recommend you look into the Dev or Crane database plan, both of which support external connections.
You can certainly do what you're suggesting in Rails, although I don't know if this gem is necessary for it. I would recommend that you familiarize yourself with ActiveRecord's establish_connection
method and how it works, and how it can be used to connect to multiple databases from the same app. This may be sufficient for your needs. It is actually what this gem uses.
There are only two advantages to using my gem:
Obviously the MySQL piece is not relevant for your needs because you are using Postgres. So I would definitely recommend you check out establish_connection
and see if you can accomplish what you need through that. This gem won't help you all that much with your use case.
ok. Thanks for your support nbudin. So, I need to check with the Crane database plan as you suggested.
Thanks, Sai
I have copied the initialiser from the gem to my application then how can I use this gem in heroku to connect to another heroku application Database. Is this be possible with this gem.
Thanks, Sai