Archive for June, 2009

RJS redirect_to params contain &

June 25th, 2009 | Category: Uncategorized

I came across this today when I added a parameter to a RJS page.redirect_to call.  It appears that prototype or rails is not properly handling the parameters when there are more than 2.  I got around it by using a defined route in the routes.rb that looks like this:

map.route_name 'controller_name/action_name/:foo_id', :controller => 'controller_name', :action => 'action_name'

I had to change the redirect_to in my RJS file from this:

page.redirect_to page_recrawl_path(:foo_id => @foo_id, :bar_id => @bar_id, :bang => true)

To this:

page.redirect_to page_recrawl_path(@foo_id, {:bar_id => @bar_id, :bang => true})
No comments

Jailbroken iPhone 3g 3.0 firmware

June 20th, 2009 | Category: iPhone

Thanks to the iPhone Dev-Team for releasing the Pwnage Tool 3.0, I was able to upgrade to the jailbroken 3.0 firmware. The install process went very smoothly. I followed a similar procedure to what they demo’d on their youtube video. Some of my favorite jailbroken apps don’t work with the new firmware. Here are my findings:

Apps

  • Cycorder: Yes
  • OpenSSH: Yes
  • SBS Settings: Yes
  • Icy: Yes
  • Cydia: Stability issues
  • PdaNet: Yes, but possible stability issues
  • Winterboard: Mostly, some themes weren’t stable
  • Pwnplayer: no
  • Snapture: no
  • NES: no

Overall the new 3.0 features were well worth upgrading. The only app I will really miss is Pwn player and I hope there will be a similar replacement (it’s no longer maintained).  As for the other apps, I’m sure they’ll be getting updates soon.  Please let me know what apps you have working.

1 comment

Ruby on Rails background process: MySQL server has gone away

June 02nd, 2009 | Category: Uncategorized

Using workling and starling to handle background tasks is very nice. Check out this link for info on setting it up.  However, I encountered the error: “Mysql::Error: MySQL server has gone away” when accessing an external DB tables like users and roles.  I found that someone recommended using verify_active_connections!, however the table the connection error occurred on was a HABTM table ‘user_roles’. I found that verify_active_connections will use the scope of the model/object you invoke it on. So the final solution was to do the following:

user.roles.verify_active_connections!

This will make sure users, user_roles, and roles all have valid connections. This error occurred using rails 2.0.1. It may be fixed in newer versions of ActiveRecord.

No comments