I want to be cool like everyone else so I use a REST methodology for most of my Rails controllers these days. I wasn’t ever quite sure how my views managed to maintain values for a given object (User, Post, etc) after a failed call to create that that did a render :action => [...]
Ruby on Rails - render :action doesn’t run action
June 13th, 2008 No Comments
Tags: render · Ruby On Rails
Ajax calls using jQuery in Ruby on Rails
June 7th, 2008 No Comments
jQuery is the hot javascript library and it is small and it is cooler than Prototype, the default library that comes with Ruby on Rails. Ergo I plugged it in and pulled out everything else. The ajax calls are very simple and look like this:
$.post(”function_name”,{ key:value } ,function(data)
{
[...]
Tags: ajax · InvalidAuthenticityToken · jQuery · Ruby On Rails
Dump an Existing Database Schema Into a Ruby On Rails Migration Ready Format
May 9th, 2008 2 Comments
I have been looking around for a plugin or bit of code that can dump the schema from an existing database into the Ruby on Rails database migration format. The solution is a ‘duh’ moment, and probably obvious to most Rails programmers. All you have to do is change your database.yml file so [...]
Tags: database · migrations · Ruby On Rails
Ruby Grand Masters
March 31st, 2008 No Comments
I spent two years in Japan. While there I met all kinds of interesting people. I remember one individual in particular because he was a chess grand master. He was also very good at Shogi. In fact he had written Shogi the video game for Nintendo.
I like chess and [...]
Tags: chess · grand master · mtnwestrubyconf · ruby · Ruby On Rails
More Ruby Conference
March 29th, 2008 No Comments
We missed the first talk this morning (sorry Devlin we suck). I slept till 9:30, but mainly because we were up till 4am. Dave South gave me some great info on using TestSpec. RSpec seems to be the hot thing right now, but I like how TestSpec is lightweight:
Install the gem:
sudo gem [...]
Tags: engineyard · mtnwestrubyconf · ruby · Ruby On Rails · test-spec
Using Amazon’s Web Services from Ruby - Jonathan Younger
March 28th, 2008 No Comments
Right Scale has a great gem:
gem install right_aws
RightScale RightAws::Sqs
RightScale RightAws::Ec2
They will automatically retry errors for you.
gem install kato
Kato - EC2 Pool Manager
require ‘rubygems’
requrie ‘right_aws’
RightAws::RightAWSParser.xml_lib = ‘libxml’
SQS = RightAws::Sqs.new(access_id, access_key) #get an SQS object
queue = SQS.queue(”name_of_queue”) #create a or get a reference to an existing queue
queue.psuh “put message in the queue” #8k max
queue.size # get an [...]
Tags: amazon · ec2 · mountainwestrubyconf · ruby · Ruby On Rails · s3 · webservices
Mountain West Ruby Conference
March 28th, 2008 1 Comment
I’m at the Mountain West Ruby Conference for the next few days so I will be doing a bunch of blog posts that look like notes.
Up right now:
Strengthening the Ruby Ecosystem & Ezra Zygmuntowicz Evan Phoenix
Evan is talking about Rubinius. Engine Yard pays him to work on the project full time. Even doesn’t [...]
Tags: merb · mtnwestrubyconf · Ruby On Rails
Plugin Loading for Ruby on Rails has Changed.
March 22nd, 2008 No Comments
I am tired of recreating the login system for Rails for each new project so using the RESTful Rails Authentication Tutorial I created a template project that I can use to create new projects. While adding in the OpenID Authentication component I started getting this error:
/Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:376:in `new_constants_in’: You have a nil object when you [...]
Tags: Authentication · errors · OpenID · plugins · Ruby On Rails
Big Companies Using Ruby on Rails
March 19th, 2008 No Comments
I am frequently asked how reliable/scalable is Ruby on Rails? I usually tell people about Twitter or more recently point them to this article about the Friend’s For Sale Facebook application. The answer is, yes Rails scales just fine. The trick is getting your database to scale.
Anyway, Obie Fernandez, a [...]
Tags: big companies · Obie Fernandez · Ruby On Rails · scalability
Ruby fs-api
March 12th, 2008 No Comments
I am in the Ruby-fs API presentation now. Funding for the library came from USFamilyTree.com.
It is REST based.
Data model is:
Person
Person has many Assertions
Assertion has one Contributor, Citation(not yet implemented), Note
Each person has a lot of data associated with them so you don’t want to be parsing xml data on the [...]
Tags: API · family search · genealogy · ruby · Ruby On Rails










