Posts tagged as:

gem

You can get cassandra at cassandra.apache.org and the ruby gem by running:

gem install cassandra

I did run into a problem with the trift_client gem when installing. If you get a Load Error, run this.

sudo chmod 644 /usr/local/lib/ruby/gems/1.8/gems/thrift_client-0.6.3/lib/thrift_client/*.rb
sudo chmod 755 /usr/local/lib/ruby/gems/1.8/gems/thrift_client-0.6.3/lib/thrift_client/connection

Here are some of the Cassandra commands from the video:

#connects to the cassandra server using the Twitter keyspace
store = Cassandra.new(“Twitter”)

# create a new column family in the Twitter keyspace called Users
cf_def = CassandraThrift::CfDef.new(:keyspace => “Twitter”, :name => “Users”)
store.add_column_family(cf_def)

# add or create a row to the column family
store.insert(“Users”, “cmaxw”, {“name” => “Charles Max Wood”, “description” => “Awesome coder”})

# remove a column from a row
store.remove(“Users”, “cmaxw”, “description”)

Download 17.2 MB
Download (iPod & iPhone) 20.9 MB
Take the 2011 Readers Survey

{ 5 comments }

With the recent release of the Google Plus beta (ask me for an invite if you want one), I felt it appropriate to show a simple way to create a Like or +1 button for your Rails application. The app and concept is pretty simple, so I won’t worry about posting the code below.

Install:

gem 'make_flaggable', :git => 'git://github.com/cavneb/make_flaggable.git'
bundle install
rails generate make_flaggable
rake db:migrate

Models:

class Article < ActiveRecord::Base
  make_flaggable :like
end

class User < ActiveRecord::Base
  make_flagger
end

Links:

https://github.com/medihack/make_flaggable
https://github.com/cavneb/make_flaggable

Download 93.4 MB
Download (iPod & iPhone) 43.9 MB

{ 6 comments }

This is a basic demonstration of adding a rake task to Ruby on Rails. Some of the same principles apply to Rake in general. You also see how to call out to the command line and how to convert ERB and HTML to HAML.

Download 51.9 MB
Download (iPod & iPhone) 30.8 MB

{ 19 comments }

Twitter just turned off Basic Auth and is forcing application developer to use OAuth. Here is a demonstration of how to add Twitter OAuth to your Ruby on Rails Application.

Download 90.9 MB
Download (iPod & iPhone) 45.6 MB

{ 24 comments }

Joe is one of the talented developers at Thoughtbot in Boston, MA.

Joe is a maintainer for the shoulda gem. Here’s a video on how to use shoulda.

Some of the gems we talked about are:

Thoughtbot is responsible for HopToad.

Joe also mentioned that Thoughtbot uses Pivotal Tracker and most developers use VIM. His VIM config files are here.

Here’s the article on Team Rotation.

Download this Episode

{ 1 comment }


Every good project needs a good setup. In this episode, I set up a github repo, create a new rails application, hook in Cucumber and Rspec, write a Cucumber feature, and write the code to make it pass.
Download 142 MB
Download (iphone & ipod) 59 MB

{ 27 comments }


Maintainability of your code can be measured in many different ways. Jake Scruggs has combined several of the tools that measure you code into one Ruby Gem: metric_fu.

Here’s a demonstration. Go check it out!
Download 116.1 MB
Download (iphone & ipod) 55.8 MB

{ 5 comments }

RVM is a program that allows you to install and manage multiple versions of Ruby and Gems. This setup is ideal for testing your application or gem (library) against multiple versions of Ruby.

Also, if you’re looking into Rails 3 on Ruby 1.9 this is a great way to try it out.

Are you thinking about moving your application to Ruby 1.9? Do you have a gem or plugin you need to test in multiple Ruby versions?

RVM is your tool. It allows you to manage and install multiple Ruby versions and the gems installed under each version.
Download 118.1 MB
Download (iphone & ipod) 49.6 MB

{ 1 comment }