Freezing Rails 2.10 with MS SQL Server
• James Mason
So I'm starting to catch up with a lot of the deployment improvements in Rails up to 2.1.0; I'm freezing Rails, and any associated gems. Some of my apps run against Microsoft SQL Server, so the activerecord-sqlserver-adapter is required. That's where I ran into trouble; trying to freeze that in... apparently a frozen instance of Rails expects the adapters to be frozen as well!
So, here's my recipe for freezing Rails into your app, with support for Microsoft SQL Server:
P.S. This would be easily adaptable for any external ActiveRecord adapter (Oracle, db2, etc.)
So, here's my recipe for freezing Rails into your app, with support for Microsoft SQL Server:
- If you've already frozen rails, you'll need to unfreeze it:
rake rails:unfreeze - add the gem dependency to your environment.rb:
config.gem "activerecord-sqlserver-adapter",
:lib => "active_record/connection_adapters/sqlserver_adapter",
:source => "http://gems.rubyonrails.org" - Install your gem(s) if you haven't already:
rake gems:install - Freeze your gem(s):
rake gems:unpack - Refreeze Rails (I use my gems - you could do this from edge instead):
rake rails:freeze:gems
P.S. This would be easily adaptable for any external ActiveRecord adapter (Oracle, db2, etc.)