So I’m giving serious thought to switch to Ruby on Rails. I have already stepped through the semi-painless installation process on my ubuntu server. Thanks to this article: Ubuntu:RubyOnRails. The switch from Prototype to jQuery was made possible thanks to jRails plugin.
I have yet to get my hands dirty in Ruby or attacked the convention-based methodology of Rails. I have found this incredibly cool information on their website about migrations. By default, you install an application (website) with a specific environment then migrate this to other environments.
Migrations are a convenient way for you to alter your database in a structured and organised manner. You could edit fragments of SQL by hand but you would then be responsible for telling other developers that they need to go and run it. You’d also have to keep track of which changes need to be run against the production machines next time you deploy.Ruby:Migrations
Active Record tracks which migrations have already been run so all you have to do is update your source and run rake db:migrate. Active Record will work out which migrations should be run. It will also update your db/schema.rb file to match the structure of your database.
So far, my mysql intregation took two steps. Edit config/database.yml
Look for this section, based on the default autogenerated file by Rails: (for development)
development: adapter: mysql encoding: utf8 reconnect: false database: mynewapp_development (Set this to your database) pool: 5 username: root (Set your username) password: (Set your password) socket: /var/run/mysqld/mysqld.sockAfter completing the changes, issue the command to rake sudo rake db:migrate