BrowserCMS: from development to production

There’re some Rails CMS such as Radiant, Refinery, BrowserCMS… and I find BrowserCMS the best one to build simple websites for my customers, we can easily create dynamic content for you websites with Portlet, create new object to manage by with Content type, and easily create template for each page (homepage, subpages…).

In this post we won’t talk about how to use BrowserCMS, please go to the BrowserCMS Wiki if you’re finding that information. This post just concentrates on things you need to do to get BrowserCMS work properly on server in production mode.

Read More »

MySQL 5.5.8 can’t start automatically on Mac OS 10.6.6

After resolving the problem of MySQL and mysql gem I got another problem: MySQL 5.5.8 didn’t start automatically when I boot my computer.

Don’t be serious, you can fix it easily by modifying mysql.server file.
Open /usr/local/mysql/support-files/mysql.server with your favorite text editor, locate the configuration of basedir= and datadir=, change them to:

basedir=/usr/local/mysql
datadir=/usr/local/mysql/data

and the problem gone, your MySQL server now starts automatically everytime you boot the computer.

now you can start the MySQL server manually (no need to reboot) by this command:

Read More »

Deploy Rails app from Github to Heroku

Recently I found deploying your Rails code which already on Github to Heroku is very useful. You can use this to show your work to your customers, friends …. Let’s start

= GITHUB

== Generate a keypair

cd ~/.ssh
ssh-keygen -t rsa -C “your@mail.com”
(enter at first prompt)

Then go to your github account then add that key in id_rsa.pub. Should use a text editor then ctrl-A to select all.

Read More »

Install and use your custom gems on Bluehost

It’s very normal your Rails app has to run under a Rails version different from the one on Bluehost (or any other hosts). If so, we have to find a way to install our own Rails gem and let the application knows about it.

Install a new gem on Bluehost (or any other hosts) is easy, just run

gem install gem_name -v=gem_version

Next, we’ll let our app where our own gems are located. In your ~/.bashrc, added these:

Read More »

NERDTree – file and directory navigator for VIM

I used to code on Windows using e-texteditor. I find e it’s very useful and light weight, that’s why I like it.

Recently I have to switch to CentOS, so I begin to code using Vim. After hours searching on the Internet, I found NERDTree, a Vim plugin that makes Vim very comfortable. NERDTree provides a folder tree on the left hand side for you to navigate. Moreover you can set your personal options to make your own working enviorenment.

Personally, after setting these options, I think Vim on Centos becomes e-texteditor on Windows, which is my favorite editor.

Read More »