dimanche 12 avril 2015

Connection of Rails 3 with Database working under other application

i had a doubt ,Suppose there is one desktop application made in .NET which uses SQL server as its DB.All inputs will be provided in this applications and all data will be store in DB.But its Admin webpage is in Rails 3.As per the scenario when user will give some input,it should be displayed in Admin side and admin can edit,delete etc.My doubt is How to connect with that SQL server which stores data and how to create the migration file.


Lets take a example.Suppose user gave the input name,email and password from .NET application side which are stored in SQL server.Admin has to see these which is made in Rails.If the following is my database.yml file and both applications are running in same network(i.e-localhost/any ip) plaese help me how i can configure the migration and set the database.yml file.


database.yml



development:
adapter: mysql
encoding: utf8
reconnect: false
database: rails_myapp
pool: 5
username: root
password: pass
host: localhost

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: mysql
encoding: utf8
reconnect: false
database: rails_myapp
pool: 5
username: root
password: pass
host: localhost

production:
adapter: mysql
encoding: utf8
reconnect: false
database: rails_myapp
pool: 5
username: root
password: pass
host: localhost


Please help me.


Aucun commentaire:

Enregistrer un commentaire