Uninitialized constant Rake::TestTask

7 Nov

I ran in to the following issue setting up a rake test task for a project I’m working on (ruby 1.9.2, rake 0.9.2.2).

The error:

Uninitialized constant Rake::TestTask

The rake file itself (ignore the encoding issues):

task :default => [:test]
 
Rake::TestTask.new do |t|
    t.libs << "test"
    t.test_files = FileList['test/test*.rb']
    t.verbose = true
end
The solution:
require 'rake/testtask'
Hope that saves somebody some time.

                    

GitHub Grubber 1.0 Release

29 Oct

The GitHub Grubber WordPress plug-in 1.0 release is now up on the WordPress Plugin Directory ready for download!

GitHub Grubber WordPress Plug-in

27 Oct

If you’re a GitHub user and WordPress blogger, then the GitHub Grubber plug-in might be just what you need!  The GitHub Grubber plugin displays a users public GitHub repositories in WordPress, more information here.

Building git from source on OS X

23 Feb

How to install git from source on OS X (10.5).

First, download the latest stable version of git. Right now it’s v1.7.0.

Fire up the shell!

Exctract

1
tar xvf Downloads/git-1.7.0.tar -C ~/sources

Configure, make and install

1
2
3
4
cd ~/sources/git-1.7.0
./configure --prefix=/usr/local
make
sudo make install

Test

1
git --version

Clean

1
make clean

Done!

Changing WordPress user passwords from MySQL.

22 Feb

I forget my wordpress login, constantly. The following shows you how to change your password hash in the database so you can login again.

If you’re using PHPMyAdmin or another GUI you can skip to step 3.

Step 1.
Log in to mysql.

1
root@localhost:~#mysql -u root -p

(Optional) Step.
You can list all databases using the show command.

1
show databases;

Step 2.
Switch to your wordpress database, via the use command. Substitue my_wordpress_database for your database name.

1
use my_wordpress_database;

(Optional) Step
You can list the tables in the wordpress database schema if you’re curios via the show command.

1
show tables;

(Optional) Step.
If you need to check which users are in the table, execute the following SELECT statement.

1
select * from wp_users;

Step 3.
Update the hash user_pass MD5 hash using the following UPDATE statement. Substitue ‘your new password’ for the actual password and substitue ‘user’ for the user you wish to update. Note that you need to keep the quotations.

1
update wp_users set user_pass = MD5('your new password') where user_login = 'user';

Hope that helps.