Run "$>ssh-add" to add private key identities to authentication agent.
Solved.
Wednesday, February 27, 2013
Thursday, February 21, 2013
Rails - Caution on adding new column and assign value to it in the same db migration - reset_column_information
This happens on staging/production rails env.
If you add a new column 'xxx' and assign value to it in the same migration,
Then, you may get error like this: undefined method 'xxx'You should do a column reset after add column:
e.g. User.reset_column_information
Wednesday, February 20, 2013
Rails - check routes in rails console
puts Rails.application.routes
Rails - Functional test directly calls the controller without using the routes.rb
Note that the functional tests bypass the router will not capture the
effect of changing HTTP verb.
effect of changing HTTP verb.
Tuesday, February 19, 2013
selenium ide - AssertConfirmation wildcard *
AssertConfirmation *
Postgresql - show version
psql --version
OR
postgres=# select version();
OR
postgres=# select version();
Git global config
git config --global user.name "Your Name"
git config --global user.email you@example.com
git config --global color.diff auto
git config --global color.status auto
git config --global color.branch auto
git config --global color.log auto
git config --global user.email you@example.com
git config --global color.diff auto
git config --global color.status auto
git config --global color.branch auto
git config --global color.log auto
Mac enable root user
How to enable the root user
OS X Lion
- From the Apple menu choose System Preferences....
- From the View menu choose Users & Groups.
- Click the lock and authenticate as an administrator account.
- Click Login Options....
- Click the "Edit..." or "Join..." button at the bottom right.
- Click the "Open Directory Utility..." button.
- Click the lock in the Directory Utility window.
- Enter an administrator account name and password, then click OK.
- Choose Enable Root User from the Edit menu.
- Enter the root password you wish to use in both the Password and Verify fields, then click OK.
Monday, February 18, 2013
Edit hosts file on Mac OS
$> sudo vi /private/etc/hosts
115.160.xxx.12 staging
115.160.xxx.11 production
115.160.xxx.12 staging
115.160.xxx.11 production
Friday, February 15, 2013
Rails - Solved - relation 'xxx' does not exist
ActiveRecord::StatementInvalid: PGError: ERROR: relation "xxx" does not
exist
LINE 1: DELETE FROM "xxx"
^
: DELETE FROM "xxx"
Solution:
Remove test/fixture/xxx.yml if exists.
exist
LINE 1: DELETE FROM "xxx"
^
: DELETE FROM "xxx"
Solution:
Remove test/fixture/xxx.yml if exists.
Friday, February 1, 2013
Subscribe to:
Posts (Atom)