Wordpress blog default config fix

The problem:

Today I went to rubyat.com/blog and got an error message claiming
/etc/wordpress/config-xxxx.com.php could not be found. The file is either not readable by this process or does not exist. Please check if /etc/wordpress/config-xxxx.com.php exists and contains the right password/username.

Something changed so that /etc/wordpress/wp-config.php is no longer viewed as the default. The fix is to find […]

Upgrading to Ruby 1.9.3-p362 and Rails 3.2.11

All versions of Rails prior to 3.2.11 have a serious security bug. Time to upgrade. Note that this machine has MySQL version 5, so step 7 is necessary for me. If you have MySQL version 6, copy libmysql.dll from there if it isn’t already on the path.

1. Install the latest version of Ruby (currently 1.9.3-p362)
  a. […]

MarkMyBook.com – first thoughts

Developing a new web site MarkMyBook.com. This web site will encourage young kids 4-13 to read, and to write about what they read. Two co-founders – Nikki Myers and Jennifer Deafenbaugh – and me, so far. Linux, Apache, Ruby/Rails, PostgreSQL. Currently hosted on Linode.

Expect to see technical issue and solutions in the weeks […]

Pry – replacement for irb

Pry is an alternative to irb that offers much more functionality. Pry can be invoked in the middle of a running program. This means you can use it for debugging, making developer consoles, and applying hot patches.

Upgrading to Ruby 1.9.3 and Rails 3.2 on Windows

My Windows machine had ruby 1.9.2 and Rails 3.1. Now that ruby 1.9.3 and rails 3.2 are out, it was time to upgrade. This method isn’t the easiest, but it worked just fine for me. Note that this machine has MySQL version 5, so step 7 is necessary for me. If you have MySQL version […]

Upgrading to ruby-1.9.2-p290

Upgrading to ruby-1.9.2-p290 on my development machines (Windows and Linux) was a breeze. There were some extra steps needed to upgrade on the server:

1. rvm get head
2. rvm reload

After that, just:

3. rvm install ruby-1.9.2-p290
4. rvm –default 1.9.2-p290
5. rvm gemset create 3.1.1
6. rvm gemset use 3.1.1 –default
7. gem install rails –no-rdoc –no-ri

and ready to roll.

Upgrading to Rails 3.1.1 on Windows

I just upgraded my Windows XP computer to use Ruby on Rails 3.1.1 with MySQL 5.1. Here’s how I did it:

0. pik is already installed via gem
1. Download rubyinstaller-1.9.2-p290.exe
2. Install ruby at c:\ruby\1.9.2-p290
3. pik add c:\ruby\1.9.2-p290\bin
4. Download DevKit-tdm-32-4.5.2-20110712-1620-sfx.exe
5. Install DevKit at c:\ruby\1.9.2-p290\DevKit
6. PATH=C:\ruby\1.9.2-p290\DevKit;%PATH%
7. pik use ruby 1.9.2p290
8. gem install json –platform=ruby
9. gem install mysql2 — […]

Rails 3.1 Is Out!

My first non-trivial Rails 3.1.0 app is working less than one hour after installing the rails 3.1.0 gem. Here is what I needed to do, including the rails install:

1. rvm gemset create 3.1.0
2. rvm gemset use 3.1.0
3. gem install rails
4. cd
4. rails new
5. cd rails_app
6. edit config/database.yml (user, password and database)
7. edit […]

uninitialized constant Rake::DSL

Using Ruby 1.9.2, Rails 3.0.9, and rake 0.9.2
This happened to me when doing a heroku rake db:migrate. The solution:
In my Rakefile, add require ‘rake/dsl_definition’ before require ‘rake’

Hat tip to http://stackoverflow.com/questions/6181312/how-to-fix-the-uninitialized-constant-rakedsl-problem-on-heroku and Kale!

Cucumber/json on Windows XP

I recently received this message while running my first cucumber application on my XP development machine:

ruby.exe – Unable To Locate Component
This application has failed to start because msvcrt-ruby18.dll was not found. Re-installing the application may fix the problem.

The solution turns out to be easy. Update old gems that still use ruby 1.8. In my case:
1. […]