4 ms·
Set ActiveRecord free from Rails: http://bradgessler.com/articles/activerecord-sprockets-should-have-their-own-command-line-interfaces/ http://bradgessler.com/a
by bradgessler 12y ago
Set ActiveRecord free from Rails: http://bradgessler.com/articles/activerecord-sprockets-should-have-their-own-command-line-interfaces/ http://bradgessler.com/articles/activerecord-sprockets-shoul...
Like the sequel gem.
- xs_kid 12y agoI love the idea.
- michaelrkn 12y agoIt's actually mostly done. To connect to your database, simply run: ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => 'db/development.db') Or, if you'd like to store your database config in a YAML file: database_configurations = YAML::load(File.open('./db/config.yml')) development_configuration = database_configurations['development'] ActiveRecord::Base.establish_connection(development_configuration) To use the Active Record rake tasks, use this gem: https://github.com/rosenfeld/active_record_migrations https://github.com/rosenfeld/active_record_migrations. It also provides a rake task for generating migrations. It would be great if that gem weren't needed - I think that's where the big opportunity for improvement is.