how to setup on Bluehost

Ok, some days ago a friend of mine asked me to write a tutorial on how to install a application. Actually, I had successfully installed it on Bluehost (failed on Justhost, I think there’re some problems with dispatch.cgi/fcgi/rb on Justhsot) application is a combination of 3 applications: trim, trim_api and trim_redirect. We have to modify the configuration files in trim/config/ only (no need on that 2 remaining apps)

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 »

Easily setup Rails app on Bluehost

Hi guys, below is the steps to setup a Rails application on Bluehost. Really easy

– create new sub domain (a folder named /public_html/sub_domain_name will be created automatically)
– delete the above folder
– “rails app_name”
– create soft link: “ln -s /path/to/your/app_name /public_html/sub_domain_name”
– create database (by cPanel)
– create mysql user (by cPanel)

– add user to database (and grant *ALL* privileges)

– modify /config/database.yml file to match the username/password, database name of mysql
– “rake rails:update:generate_dispatchers” to create 3 dispatchers.rb/cgi/fcgi (will use fcgi, chmod 755)
– create .htaccess with content:

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 »