** Please have a look at standalone_migrations gem instead. Thanks. **
This gem makes it easier to install rake task needed to use activerecord in your non-rails project.
It's mainly a gemified and slightly improved (added a way to pass different envs) version of a gist I found online.
Add this line to your application's Gemfile:
gem 'activerecord_sans_rails', git: 'https://github.com/andhapp/activerecord_sans_rails.git'
And then execute:
Add the following code in your app's Rakefile:
require 'activerecord_sans_rails' ActiverecordSansRails::load_rake_tasks
After checking out the repo, run
bin/setup to install dependencies. Then, run
rake spec to run the tests. You can also run
bin/console for an interactive prompt that will allow you to experiment.
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/activerecord_sans_rails. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.