Generate Ember.js models using your Rails Schema
I love Ember.js. I hate typing and I especially hate typing code that a machine could build. I got really tired of reading a Rails schema to build new Ember.js models so I create…
I love Ember.js. I hate typing and I especially hate typing code that a machine could build. I got really tired of reading a Rails schema to build new Ember.js models so I create…
If you write code you hate Internet Explorer. You get everything just right in Chrome, Firefox, Safari – any other browser really and then everything falls apart in Internet…
Setting up a new Mac is always a joy. You forget how many configuration errors you solved long ago. Here’s one I just ran into. I started getting this error when doing OAuth with…
Like so many other internet startups, OER Glue is a multi-tenant application. The process of hosting many of clients using a single piece of software presents a number of…
I thought I had fixed everything and made ready for Rails 3 in my applications. Turns out I was wrong. My wife tells me I’m wrong all the time so I didn’t feel to bad. The first…
I’ve got a rake task that includes a section where I do something like this:
I’ve been updating the muck gems to work with Rails 3. The change is significant and painful but in a good way. For the most part the change consists of deleting all the code you…
I’ve been trying to get Uploadify to work inside my uploader gem . Things went pretty well until I combined that with the muck-contents gem and tried to do multiple file uploads…
I ran into a ‘fun’ error with an application I’ve been working on. Everything was running fine and then one day hoptoad started filling up with exceptions like this: I hate errors…
I like jQuery. I use it in all my Rails projects these days. One thing I’ve struggled with for the longest time is that for some reason all my jQuery ajax requests come through as…
On a site I’m working on I started noticed a lot of production errors like this: ActiveRecord::StatementInvalid: Mysql::Error: Lock wait timeout exceeded; try restarting…
After installing the Textmate RSpec bundle I started getting this error: /Applications/TextMate.app/Contents/SharedSupport/Support/lib/builder.rb:86:in…
I have some code that looks like this:
I just got a new laptop which means re-installing everything. This included Rails and I ended up with 2.3.8. Most of my projects use 2.3.5. I figured no big deal since various…
It took me far to much time to get this to work right so hopefully this is helpful for someone (probably me at some point in the future). The hashrocket guys have a great writeup…
I spent last week at the Mountain West Ruby Conference which is by far the best conference I’ve ever attended due to the brilliant minds that gather from all over the country…
I’ve written about the disguise gem before, but I’ve made enough changes that it warrants a new blog post. I noticed a few performance problems which have now been fixed and the…
Over the years I’ve had a chance to use the three tagging libraries available for Ruby on Rails: acts-as-taggable-on acts\_as\_taggable\_on\_steroids acts\_as\_taggable I think…
I’ve been upgrading some old code and noticed that my unit tests started spitting out a lot of errors like this:
For quite a while I’ve been wanting to play with OAuth and now that I’ve been able to spend some time playing with it I have to say it is awesome. Instead of asking for a user’s…
For the longest time I’ve deal with internationalization in Ruby on Rails by hand. This is a tedious process that involves switching back and forth between the file containing the…
I’ve watched Heroku for a while. I’ve even tried to deploy an app there a few times, but never got into it that much. I needed a cheap (free) place to put My Amazon Feeds.com…
One more post on Amazon Wishlist code. As another follow up to my post on Amazon Wishlist RSS, Ruby and Signing/Authenticating your Requests and the site I built to run the code…
If you are using Jeweler and get this error: no configured for Check out the troubleshooting section: You need to edit ~/.rubyforge/auto-config.yml and make sure processor\_ids is…
I started running into a few issues on an Engineyard Solo instance with my muck gems. Basically, muck consists of a lot of Rails engines packaged as gems for reusability. When we…
I couldn’t figure out why my gems wouldn’t unpack until I ran across this: http://metaclass.org/2009/4/13/rake-gems-unpack. My gems have rake tasks and I have to include them in…
UPDATE: If you don’t want to bother with the code and instead would just like to get your Amazon.com Wishlist rss you can go here. I’ve been playing with the Amazon API lately. At…
Tonight for no apparent reason my tests started turning up this error whenever I tried to call to\_json:
I can’t resist new stuff so I’m updating Genlighten to Rails 2.3.2. This release comes with some pretty sweet additions like Rack. Here’s what I had to do: Set RAILS\_GEM\_VERSION…
I’m not sure if this applies to all the versions of Rails, but right now I’m using the latest 2.3.3. I’m using shoulda to do testing and my code looks like this:
The docs for jQuery.ajax indicate that by default the request is made using ‘GET’. I would still recommend setting the type to ‘GET’. We just deployed a site and found that for…
I’ve been beating my head against the wall trying to figure out why html emails from my Rails Engine are sent out as plain text ie the email shows up with all the html tags…
If you need an easy way to setup email for your company or for a client it’s hard to not love Google Apps. (The ‘standard’ ie free version is here). It is very likely that at some…
I’ve been racking my brain trying to figure out why my gemspec for a new gem had no files in it. I’m using jeweler to build the gem and it’s worked great in the past. Then I read…
I just pushed out a new uploader gem. Get the new code from github or install the gem with sudo gem install uploader. This comes with a few more translations and a fix for a nasty…
I’ve been working on a number of gems that are basically packaged Ruby on Rails engine plugins. It turns out that turning gems into plugins is pretty easy to do. However, testing…
If you’ve been working on Rails 2.3 engines (the new stuff that comes with Rails 2.3 not the old engine plugin) and you start running into either of these errors: Or Don’t go find…
I spent quite a while trying to figure out how to theme my Ruby on Rails applications. Turns out after you build a piece of software people want to use it to do other stuff. Go…
If you’ve spent much time working with Ruby on Rails and more especially if you’ve done anything with json you might have run across errors like this:
I’ve been using newgem to build Babelphish (translation helper thing). The docs from the ruby forge site are a bit out of date. If you use newgem to build anything be sure to look…
You’ve just finished version one of your most excellent, million dollar application. You’ve built it the right way. All of your application’ strings live in the en.yml file neatly…
So you’ve worked hard to integrate your website with authorize.net and now you’re ready to turn it on and make the big bucks. You run your first real transaction and get: User…
A pretty common problem when developing a Rails application or any web application for that matter is how to deal with content. I’ve often run into situations where the content…
I found a chance to try out the new nested forms in a project I’ve been working on for a long time. (I actually tried them out a long time ago in Edge Rails, but then got burned…
After upgrading to Rails 2.3.2 I started getting this error: Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for…
I’ve been to a good number of conferences over the years. A lot of them cost a lot of money. If you are a geek and a ruby lover (who isn’t?) then the best event you’ll ever attend…
I spend most of my time working with Ruby on Rails these days. However, I still do .Net programming mainly for ThePlanCollection.com. Our password recovery system has been a bit…
Working with Paypal can be a bit difficult not because of the code required, but rather because their website can be a hassle to navigation. I already have ActiveMerchant…
‘single\_message’ should normally be set to false. I added it in just in case I needed to render a single message for an ajax call. If you aren’t rendering an entire tree and thus…
I tried the latest shoulda on luvfoo a while back and it died on the internationalization stuff so we gave up. Turns out that with the new internationalization in Rails 2.2.2…
If you upgrade to Rails 2.2.2 and start getting “The binding argument of #concat is no longer needed” then wherever you do something like this:
I like to use to deploy my applications because of its simplicity. The other nice thing is that they give you free developer space so if you are just getting an application up and…
I’ve had my problems with shoulda, but one very powerful component of the testing framework is the ability to create macros. Here’s one that checks to make sure a user has to be…
For lack of a better place to put this right now I am posting the roadmap for the Ruby on Rails social network we are building here. There has been quite a lot of interest in the…
During the day and lately most of the night I work as a Fellow for Teachers Without Borders at Utah State University. (funded by Cisco). What I actually do bores most people and…
We are looking at ways to integrate the new Teachers Without Borders site with Google docs. Turns out that you can open: documents – .pdf, .doc, .txt, .html, .rtf and .odt…
Shoulda comes with a great method for testing email called ‘assert\_sent\_email’. (If you try it and get a method missing error update Shoulda. Not that anyone wouldn’t know to…
For the project we are working on for Teachers Without Borders we need a reliable asynchronous way to process tasks. There are a myriad of ways to do this and if you aren’t…
I decided to try out the latest edge Rails and I started getting this error:
If you are using the acts\_as\_state\_machine plugin to manage the state of your object keep this in mind: If you are going to have an object like an order or something similar…
One of the models in a project I am working on right now ends in ‘status’. Rails handles that just find but in my tests I started noticing an odd error:
I have been banging my head against a problem in my testing. Using the UI everything worked as expected, but my tests were failing when I tried to see if emails were being sent in…
Shoulda comes with a great method for testing email called ‘assert\_sent\_email’. (If you try it and get a method missing error update Shoulda. Not that anyone wouldn’t know to…
We have to do an integration with Saleforce for a Rails project we are working on. I keep getting this error: The :dependent option expects either :destroy or :delete (:nullify) I…
Checkboxes are one of those things that look easy and should be easy, but they aren’t always easy. I needed a solution that could create a checkbox list of languages that a user…
Last year for our open ed conference here at Utah State I built an application called 51weeks to help preserve the presentations and to help people interact. Tomorrow it will be…
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…
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…
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’…
One of the most difficult tasks when putting up a new site is picking the right host. Moving hosts later on is terribly difficult so choosing the correct hosting company is as…
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…
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…
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…
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…
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…
I am frequently asked how reliable/scalable is Ruby on Rails? I usually tell people about Twitteror more recently point them to this article about the Friend’s For Sale Facebook…
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…
My code was running fine under Rails 2.0.2. Then I enabled the db based session store by uncommenting this:
We are at the end of the second day of the OER code sprint. This has been a great time feels quite a bit different than the higher level OER meetings I have attended. The first…
Professionals and the enterprise Under threat of divorce if I didn’t hang my Christmas lights this past Christmas I braved the elements and managed to put them on the trees. Of…
I am stealing this from Dave South, Logan Ruby User Group Illuminati. If I don’t extract it from my email I’ll never find it again. So I’ll ask for Dave’s forgiveness for the…
Uploading a file to a website is a pain. Uploading lots of files to a website makes the UN list of known methods of torture. At tonight’s ruby group meeting Dave South showed off…
I love how when you need something in Rails the solution is usually already in place. For instance in the indulgenc.es application I have the need to create a rank with 1st, 2nd…
I am adding this so I don’t forget. You can install Rails 2.0 using this: rake rails:freeze:edge TAG=rel\_2-0-1 Then if you want to keep up the with the latest edge version you…
Right now Joyent is giving away free Accelerator accounts to Facebook developers. I love free stuff so this is so cool I could just cry. Free hosting with one of the premier Ruby…
I can’t take credit for any of these instructions. Dave South from the Logan Ruby group sent these out in an email. I am posting them so that I can find them later on. Install…
So if you are ever working oh so hard on a ruby on rails application and all of a sudden your application stops working and you have no idea why because the error looks like this:
It is top secret, but I am working on another Facebook application. This time I am using Ruby On Rails since I don’t have to deal with legacy issues. I’ll be interested to see if…
I have been working with rFacebook to try to get a Facebook application up and running. Right now we are trying to integrate our conference application – 51weeks.com with Facebook…
This problem may not be specific to rFacebook, but when I added acts\_as\_facebook\_user to my user model and then made a call like:
We use Edge Rails in our projects. Call me stupid if you like, I like living on the edge (get it?). This desire to push our luck has bitten us a couple of times, but not in any…
If you love Ruby on Rails, and you should love it then you might enjoy these tutorials on Rails Forum.
When I first saw nested resources in this REST paper I thought cool that makes sense. So we started using the nested resource method in our projects. Then it got a bit wierd –…
Jamis Buck blogged about the code review of Ozmozr he and Marcel did at the Mountain West Ruby Conference. The presentation was our favorite because of the insight it gave into…
In a lot of my posts I said that I would link to the presentation. All the presentations can be found here: http://www.web2expo.com/pub/w/51/presentations.html My favorites from…
Now that I am home and have managed to sleep a bit I have been thinking about my overall experience at Railsconf 2007. Overall it was great. It was fun to meet so many people…
Ferret is fast. He has moved around and the documentation is a bit sparse. Solr was created by people at CNET, used by Internet Archive, Krugle, Revolution Health, his projects…
Don’t forget to look at The Rails Way blog. Move logic into your model. This lets you break functionality into more granular components and makes testing easier. Keep your…
I have eaten a lot of bad food over the past few days which is too bad given that Portland has good restaurants. The main source of bad food is the Rails conference. A WORD TO…
Practical Design for Developers David Verba Another standing room only session. Perhaps the organizers will wise up and have at least on larger room next year for the sessions…
Saleh is talking about using a Daemon to get rails to talk to LDAP. The code for the LDAP deamon and the code to make it look like a model live here. I will add a bit of code here…
I ended up with a major migraine yesterday towards the end of David Black’s talk so I didn’t get a chance to finish up the post. Don’t worry I probably won’t. My overall…
After the Two Revolutions session I had a few minutes to talk to DHH. First I must say he is just a very nice guy. Programmer envy over. I had a discussion about OpenID. It is…
Sitting in the community app presentation right now. I was torn between this and the clean code presentation, but since we are building community apps this presentation seemed to…
Chad Fowler is talking right now. I think he works on giving keynotes that leave you scratching your head a bit. His keynote at the Mountain West Ruby conference had mixed…
Listening to DHH right now. Play DHH buzzword bingo here. http://bingdoh.com/games/dhh-keynote He started out talking about the growth of the community and making fun of a job…
Chad Fowler is talking right now. I think he works on giving keynotes that leave you scratching your head a bit. His keynote at the Mountain West Ruby conference had mixed…
Chad Fowler is talking right now. I think he works on giving keynotes that leave you scratching your head a bit. His keynote at the Mountain West Ruby conference had mixed…
Chad Fowler is talking right now. I think he works on giving keynotes that leave you scratching your head a bit. His keynote at the Mountain West Ruby conference had mixed…
Chad Fowler is talking right now. I think he works on giving keynotes that leave you scratching your head a bit. His keynote at the Mountain West Ruby conference had mixed…
Chad Fowler is talking right now. I think he works on giving keynotes that leave you scratching your head a bit. His keynote at the Mountain West Ruby conference had mixed…
Chad Fowler is talking right now. I think he works on giving keynotes that leave you scratching your head a bit. His keynote at the Mountain West Ruby conference had mixed…
This session is totally packed. We managed to sneak in. The door guys don’t like that much. If there is a fire we will all die. Adam Keys is funny and entertaining “If you want to…
I tried to get into the REST talk but it is so full that they have guys guarding the doors to keep people out. I am instead sitting in an extreme programming session. I wouldn’t…
Sitting in a session by David Black. He is talking about routing in Rails. It is starting out pretty basic, but I am hoping that it will end up covering the more complex issues as…
We flew into Portland last night so that we would be ready bright and early this morning. I hate waking up at 6:30 am to go to a conference. We are programmers when will they…
Just short of a year ago I hacked together a project that we loving called scrumdidilyumptio.us. I and Wiley managed to finish it at about 2 in the morning in a hotel in NY during…
For years I have relied soley on typing to keep me in shape. Most of the frameworks I have used managed to help me keep the pounds off. They required plenty of code and my fingers…
I finally worked through most of the challenges I was faced with and I like asp.net again. It is interesting to program in several environments. I do a lot of Ruby on Rails these…
For a long time now I have been trying to figure out how to update The Plan Collection to an open source platform. I find myself updating it to ASP.Net instead. ASP.Net is ok to…
I have spent the past few weeks working on two projects. One is brand new and very exciting – houseplans.info. I developed that site in Ruby on Rails and it uses mysql on the…
As per my last post I am loving Ruby on Rails. The biggest drawback to the framwork is my quest to find the right editor. I have actually been using Dreamweaver when I write code…
I have worked in numerous roles as a programmer. My lot has been everything from low level USB firmware to Visual Test to ASP and then ASP.Net. Years ago, when I first saw ASP.Net…