By BoLOBOOLNE payday loans

Ruby on Rails

Choosing a web framework: Python, Django vs. Ruby on Rails

Posted in Geek, Python, Ruby on Rails, Software Engineering on May 23rd, 2010 by leodirac – 28 Comments

One of my responsibilities in my new job is to lay the groundwork for development of the company’s technology.  One decision that was pretty easy to make is that we’ll be building tools that you can use from a web browser, that is to say, a web application.  Next comes the choice of what language […]

...full article


Tagmindr: Use del.icio.us to set web-page reminders

Posted in Ego, Geek, Infoglut, Ruby on Rails, Seattle on October 8th, 2007 by leodirac – 4 Comments

I spent Saturday hanging out with about a dozen hackers building Tagmindr: Remember the future. Here’s the site’s self-description: Put any bookmark in a time capsule and we’ll send it to your future self. Give us your del.icio.us username and we’ll feed you anything that you’ve tagged as: “tagmindr” and “remind:YYYY-MM-DD”. We’ll remind you via RSS, SMS, Email or IM, so long as it’s RSS. (SMS, Email and IM coming later.) The use case is that you find a page about a product or service that you’d like to look at sometime later so you tag it into del.icio.us thinking…

...full article


Rails bug with assert_redirected_to causing NoMethodError: undefined method `first’

Posted in Geek, Ruby on Rails on October 7th, 2007 by leodirac – Comments Off on Rails bug with assert_redirected_to causing NoMethodError: undefined method `first’

I’m posting about a bug I ran into recently in Rails. It’s filed against the core team and being addressed, and documented on the forums, so this post might be unnecessary. But the bug is bizarre and confusing enough that I thought I’d post a succinct summary of the problem and how to fix it. If you have code in a controller that redirects to another page, say like this: def index redirect_to :controller => :store # WRONG! end This looks fine and actually runs fine too. But there’s a problem if you try to test it — the tests…

...full article


Facebook apps in Rails: Bug in rfacebook-0.6.4 – fbparams not set

Posted in Ruby on Rails on July 20th, 2007 by leodirac – 2 Comments

Like a number of other developers, I’ve been beating my head against a wall for the last couple of weeks trying to figure out how to set up a facebook app using ruby on rails. I finally figured out at least one major problem I’ve been running into — the standard library for writing facebook apps in ruby, rfacebook, has a bug in its latest version 0.6.4. I haven’t figured out exactly what’s wrong yet, but I’ve figured out how to avoid it. If you’re getting this kind of error message: You have a nil object when you didn’t expect…

...full article


Model Security: Such a good idea

Posted in Electronic Security, Ruby on Rails, Software Engineering on May 9th, 2007 by leodirac – 2 Comments

Why it’s good to break the MVC pattern Bruce Perens hit on a really good thing when he wrote a package for Ruby on Rails called Model Security. It’s too bad the project is gathering dust. But even if you don’t use the whole thing (I haven’t been able to) there are some really valuable ideas and chunks of code in there. The idea behind Model Security is to centralize security rules in the model classes. Certain objects can only be accessed by certain users. Perens talks about multi-layered security. But in my mind the real benefit is that you…

...full article


Offbrain: Externalizing Memory

Posted in Ruby on Rails, Transhumanism, User Experience on May 3rd, 2007 by leodirac – 1 Comment

I’m ready to introduce a little pet project to the world: Offbrain Mobile Memory Services. Right now it’s a very simple web app that just keeps track of lists of things. The only thing that makes it at all interesting right now is that the UI is optimized for display on mobile browsers. It’s modeled after the fabulous mobile gmail interface. Offbrain’s pages are typically between 1k and 1.5k total — they load very snappily on very slow mobile links. (Assuming dreamhost hasn’t swapped the app or the database into virtual memory — a perennial problem with cheap shared hosting.)…

...full article


Problems Scaling Ruby to Complex Systems

Posted in Personal Growth, Ruby on Rails, Software Engineering on March 4th, 2007 by leodirac – 8 Comments

I’m pretty annoyed with Ruby right now. At least I feel that way. Looking a little deeper I realize the source of the annoyance is, like usual, my own shortcomings. My friends and I embarked on a software project a while back. I helped talked the group into using Ruby on Rails as the framework over choices like Java or .net because I was excited about it. Many had reservations. Today I’m annoyed at myself for not listening to them more. The biggest problem with an uncompiled language is that there’s no compiler to tell you when you’ve screwed something…

...full article


How to fix failed migrations for “Lost connection to MySQL”

Posted in Ruby on Rails on December 16th, 2006 by leodirac – 1 Comment

Yet another in the long series of “why does rails give such useless error messages?” I could migrate in the development environment fine, but when i tried to migrate in the test environment, I got this: C:\dev\radrailsws\snorb>rake migrate RAILS_ENV=test (in C:/dev/radrailsws/snorb) rake aborted! Mysql::Error: Lost connection to MySQL server during query: SELECT version FROM schema_info After a bit of digging I thought it was because the mysql account in the test environment is different from development, so I ran this to grant full permissions: mysql> grant all on snorb_test.* to unit_test_user Query OK, 0 rows affected (0.00 sec) But that…

...full article


Missing GEM causes misleading “use_transactional_fixtures” error

Posted in Ruby on Rails on October 31st, 2006 by leodirac – 1 Comment

A lot of people out there on the net are getting frustrated by this error message coming out of their unit tests: undefined method `use_transactional_fixtures=’ for Test::Unit::TestCase:Class (NoMethodError) I was recently getting this in my unit tests on my continuous integration server. The problem is that this has message nothing to do with the actual error. Rake has this bad habit of silently swallowing useful errors. Sometimes is just stops without saying anything, and other times it gives a completely incorrect message like this one. In my case, the problem was a missing gem on the continuous integration server. I’ve…

...full article


Chinese characters in Mysql: Dont forget the collation

Posted in Databases, Ruby on Rails, Software Engineering on October 16th, 2006 by leodirac – Comments Off on Chinese characters in Mysql: Dont forget the collation

I recently conquered another oddity in using chinese characters in MySql. Apparently, it’s not enough to set the database’s character set to UTF-8. You also need to set the collation to a utf-8 collation. You might think the collation is only important for sorting, but theres’ more to it. If you have selected a case-insensitive collation, then it is also used to determine equality. If the collation doesn’t understand character boundaries properly, then you run into strange problems. The database was convinced two very different chinese characters were the same because their UTF-8 encodings when interpretted as 1252 had similar…

...full article