First Rails patch merged in!
Written by matt on May 25th, 2007
I'm quite glad to let you know that my first patch made it to Rails Edge.
UPDATE: Ryan Daigle covered the new added features in his blog How cool is that?
That's a great achievement that I owe to josh Knowles and Josh Susser
Josh Knowles and Matt Heidemann from Integrum started working on rake_tasks a little while ago. I helped them hacking this cool plugin. After a while, we realized that the plugin was getting too big and we decided to split it in two:
- db_tasks
- svn_tasks
Without telling the other guys (sorry!), I started discussing merging some of the rake_tasks plugin in Rails core.
I then submitted my patch following Josh Susser recommendations.
Today, Josh congratulated me on the merge. I'm quite glad/proud that our work made it to Edge.
What's that patch anyway?
Here are the 2 features my patch added to the future Rails 2.0:
- MySQL: create_database takes :charset and :collation options. Charset defaults to utf8.
- Add db:create, drop, reset, charset, and collation tasks
That means that you cna now do that:
$rails my_app
$rake db:create
$ruby script/server
That's it, you have a working Rails app!! Well, almost, there's nothing it in yet but at least your databases are created. Ohh, and your database is unicode, that also means that all your new tables will be utf8.
Enjoy :)
Comments
-
Congratulations! Definitely a useful task.
-
Thanks Nic :)
-
Regarding your 'rake db:create', it did seem very nice. But as a PostgreSQL user I really hated how you used the command line instead of your same patch just with a bit different syntax. So I made a patch to rails edge to fix that for you, so you don't have to. Just copied the MySQL implementation, and this came out http://dev.rubyonrails.org/ticket/9042 Hope when this patch gets through, you will change that command line 'createdb' in that db:create task. Thanks for the great plugin!
-
Just sent in another patch, for the tasks.
When those two patches are integrated, PostgreSQL will behave much like MySQL in the db:create/drop tasks. Instead of using command-line utilities that rely on the environment instead of whats in database.yml.
http://dev.rubyonrails.org/ticket/9045


