Offsetting flight emissions
I’m flying back to Phoenix today, as part of my telecommuting agreement. Due to the fact that I’ll be flying frequently, I feel that I should do something to balance the impact on the environment of my flights. Flying burns a lot of fuel, and flying from Columbus, OH to Phoenix, AZ is certainly no exception. So, today, I’m purchasing a Flight TerraPass to offset the carbon emissions of my flights.
Error working with large YAML files
As part of my Application migration project, I need to pre-populate the new database with zip code data. The Rails Recipes book (very useful) has a nice recipe on extracting fixtures from live data. So, I’ve created a zips.yml file that contains all the zip code data that I can insert into the new database. However, when I try to load the fixture using this very cool rake task from Technoweenie, the YAML library throws the following exception: SystemStackError: stack level too deep.
Rails Migrations - Dropping default constraint on column
I’m working on a project for a client to convert a website from PHP to Ruby on Rails. The database is also changing from Microsoft SQL Server to MySQL, along with several schema redesigns.
One thing I wanted to do to our new db, was change a foreign key column from NOT NULL DEFAULT 0 to allow nulls and remove the default. Currently, the organizations table has a record with ID = 0 to signify a blank organization. Users that do not belong to an organization, have a foreign key to that Zero-record. Well, a better way to represent that is for the foreign key column in users to simply be NULL and ditch the Zero-record in the organizations table.
I have created a Migration class to handle the schema change. However, it looks like I have to drop to SQL as there is not Migration way of doing this. Here’s what it looks like:
execute 'ALTER TABLE users ALTER organization_id DROP DEFAULT'
I wanted to be able to handle this in the Migration-syntax, but I don’t think that’s possible. It would be nice to do something like:
change_column :users, :organization_id, :integer, :default => :null, :null => true
Cool Google Maps flight simulator
Now this is a pretty cool idea!
Rails redeploy issue resolved
I just redeployed a rails site for a client of mine, Real Idaho, using Capistrano and it didn’t work properly. I was able to resolve the issue, and here are the details in case this ever happens to you…
Solar Wi-Fi To Bring Net to Developing Countries
I think this is a very cool idea and one I am very glad to see happening. I really think efforts like this can be worldchanging, and do a lot to help people, especially children, in the developing world to have more opportunities. The project is Green WiFi and is founded by Bruce Baikie, former manager of strategic marketing and solutions for the telecommunications industry at Sun Microsystems, and Marc Pomerleau, currently a member of Sun Microsystem’s identity management marketing team. According to their site:
Is your site really Web 2.0? 1
Now you can run your website through a handy-dandy Web 2.0 validator, to see if it really is Web 2.0. This site was put together by 30 Second Rule, a website design and development company in Phoenix that is active in the Ruby community. My blog’s score should be upped by writing this article! :)
![[image]](http://mowser.com/img?url=http%3A%2F%2Fstatic.flickr.com%2F96%2F215397058_9ac81d3aa6_m.jpg)