Rails uses MS SQL database

In my rails application, I need to use an existing MS SQL database. I tried following this guide:

http://rubyrailsandwindows.blogspot.com/2008/03/rails-2-and-sql-server-2008-on-windows_24.html

I do not know how to make models, scaffolding, etc., because the rails cannot just use another db. I did not want to run rake db: migrate for my tables in the MS SQL database. What else do I need to write in the model? If it is simple: use tables from the MS SQL server database, but I also want to solve the problem with migrations, etc.

+4
source share
1 answer

If you need to run Rails on top of an existing database, and you want you to be able to create all models matching existing tables, follow this guide:

As an alternative to ActiveRecord, you can consider DataMapper , as it claims to work better with the brown field (that is, already installed).

+1
source

Source: https://habr.com/ru/post/1447772/


All Articles