Update On RailsPress

I started a project to migrate WordPress to Rails. I called it RailsPress.

I installed WordPress on my laptop and made a couple of posts.

I found a gem called rmre that can reverse engineer a database and produce ActiveRecord classes and a schema.rb file. I made a separate gemset with RVM, but it still took some doing. I ran it a couple of times since it kept complaining about a dependency. Finally it complained that it could not find the 2.9 .0 version of the mysql gem. I added that to the Gemfile, ran bundle install, and it complained it could not find the 2.8.1 version of that gem. So I added that version manually via the gem command. I got it to work, so I added the model classes

Then I started another project called rails_press_work. I used the schema.rb file I got from rmre to get the fields for the commands to generate the scaffolds, and used them to generate models, controllers, views and rspec files. I copied those over to the main project, and got the tests to work. I did that for two models so far. I had to edit the valid_attributes methods in the controller specs.

I then noticed that when you revise a post that WordPress makes two entries in the wp_post table. So I will have to do some digging. I got the Apache log4php project, and I got it to work on my local WordPress install. I will see if I can figure out how to keep the post revisions straight.