This episode demonstrates how to extend deployment to deploy to stage and production. Overall it’s rather simple. All it entails is creating a new task for each stage you want to deploy to with the settings you need changed.
Here’s an example:
task :stage do
role :web, “stage.teachmetocodeacademy.com” # Your HTTP server, Apache/etc
role :app, “stage.teachmetocodeacademy.com” # This may be the same as your `Web` server
role :db, “stage.teachmetocodeacademy.com”, :primary => true # This is where Rails migrations will run
set :deploy_to, ‘/var/www/stage-teachmetocodeacademy/’
set :user, ‘deploy’
That will allow you to run `cap stage deploy` to deploy to your staging environment.
Ruby Mendicant University is a free online school for software developers. It’s a blended teaching and mentoring program that helps people improve their coding skills. It’s aimed toward intermediate level programmers.
The “RubyGems uprising” is something that Greg stepped in and opened up some dialog about the direction and movement of the RubyGems project. The future is looking bright and the public management of the project is much better.
Greg has contributed to open source through the Prawn library. He responded to Brandon Hays’ query about getting involved in open source software and gave us some pointers about getting involved and managing open source projects. One thing that stood out was when he talked about not taking feedback on your open source project personally.
It’s really eye opening to consider that when people deprecate or remove features from a project like RubyGems, it may be so that things can move forward in a meaningful way.
Finally, we talked about the Ruby Best Practices book, the process of technical book writing, and the process of teaching and learning programming. Greg has given a lot of thought to how and why we learn to program.
Polymorphic associations are very simple, as are many-to-many associations. When you blend the two, it’s not nearly as simple. Since there isn’t a working build-in mechanism for many-to-many polymorphic associations.
Here’s a quick demo of what happens if you try to set up a traditional has_many :through association with a polymorphic association. I also show how to set things up so you can get the associated objects.