Author Archive
problems upgrading devise in an rails 2 to rails 3 migration
by specialj on Apr.22, 2011, under Ruby On Rails
I ran into some problems upgrading devise from 1.0.x to 1.3.x.
- to use passwords besides bcrypt you have to made 2 changes:
- in config/initializers/devise.rb
- config.encryptor = :sha1 (for devise 1.0.x compatibility)
- in User model (or whatever model calls devise)
- call devise with both :database_authenticatable and :encryptable
- you can tell you have issues with this if you see errors like BCrypt::Errors::InvalidHash or “invalid hash”
- in config/initializers/devise.rb
- browser validation prevents sign in with something other than email
- I create app/views/devise/sessions/new.html.erb from the devise version and changed email_field to text_field
- Can’t log in with “username” (some hidden JS blocking) – Devise | Google Groups
playing with ruby gui frameworks
by specialj on Apr.19, 2011, under Development
Trying to figure out how easy it is to use ruby to write a desktop application. It would be nice to have something cross-platform. At the moment I’m playing with qt4, gtk2, and wxwidgets.
Firefox seems to load content in noscript tags when javascript is enabled
by specialj on Apr.07, 2011, under Web Development
I can’t find any information about this, partially due to the badly named noscript extension, but it appears that firefox will load an image in a noscript block even when javascript is enabled. This is troubling for my use because I’ve put a static google map on an app for those that do not have javascript and wrapped it in a noscript to avoid loading it when it’s not needed. Now javascript users have to download the map twice, once static, once dynamic. Definitely a waste. Maybe this is fixed in firefox 4.
Some pc builds
by specialj on Apr.06, 2011, under Hardware
These are some numbers for the cpu/mb/ram/video assuming all else will be equal. The AMD Phenom II X4 945 is available again. It’s a great CPU that allows for ECC RAM, if one is willing to spend 2x as much for ECC RAM these days. Intel Sandy Bridge system will be much quicker, though I am considering waiting for Z68 motherboards to become available as that is only a month or so away.
fixing a bug in simple-rss
by specialj on Apr.05, 2011, under Development
Just walking through some bug fixing.
Comparing Piwik vs Open Web Analytics
by specialj on Apr.05, 2011, under Sysadmin
Just some notes. Of course one could use both.
Working with google maps, rails, jquery, microformats
by specialj on Apr.05, 2011, under Development
Lots’ of work moving to unobtrusive mapping using googe maps and jquery, storing location data as hcard microformat.
Need a new cell phone
by specialj on Apr.04, 2011, under Hardware
My phone is experiencing a lot of problems, most noticeably that call quality has been abysmal. So I’m looking at new phones and perhaps a new carrier / plan.
I don’t like buying Intel CPU’s
by specialj on Mar.28, 2011, under Hardware
I speculated earlier that I might buy a sandy bridge CPU and motherboard and that it would represent a break from 16 years of buying AMD. I have always bought at the low end of price where AMD has always offered superior competition. But I am not blind to how well sandy bridge systems perform and I am looking for more performance from my next system. I was strongly considering buying the i5-2500K and an H67 chipset motherboard. But today I learned about yet another limitation to this configuration (above the 2500K not supporting VT-d and TXT, though I’m sure no TXT is actually a loss) and that is that you cannot overclock it. So as usual Intel has a lineup which is complicated to make a choice because of all the various options in play. I much prefer AMD’s simple setup: all features on every chip and you just pick the speed and cache. Not to mention that I’d really prefer to buy ECC RAM which you can do on a consumer AMD motherboard but not on any consumer Intel board.
Git: Untracked working tree file would be overwritten by merge
by specialj on Mar.23, 2011, under Development
I ran into a merge conflict when a branch had changed a file and I was merging in another branch where the file had been deleted and placed in gitignore. Some suggestions on handling this here:
I used:
- git checkout <your-branch> -f
I then need to “git rm” the file in the branch where it had been modified. I’m not sure what exactly happened to the file since I didn’t care much about it.