branch4 Blog

Internet development with every single possibility.

[Rails] Couldn’t Find User With Id=sign_in

| Comments


While using devise on rails3, I got the following error message.

      Couldn't Find User With Id=sign_in Devise on Rails 3
It was working yesterday, but not today.


I checked config/routes.rb, and had

      resources :users
      devise_for :users
which seemed to be interupting each other.
So I commented out resources :users, and it started to work fine.
I don’t know why it kept working till yesterday…

[1 Liner] Easily Replacing a Domain in Multiple Files

| Comments

Just 1 liner I sometimes use.

    for i in `find -type f`;
    grep "" >& /dev/null $i;
    if [ $? -eq 0 ]; then
      sed -i.bak -e s,,, $i;
This will…

  1. find files that contains “”
  2. replace =>

[Android] onClick Event With ImageView

| Comments


As said in the title.
It was my first shot using onClick event with ImageView, so just for memo.
(in fact it’s my first Android development)
Keep in mind that this seem just to be one way of implementing onClick event with a view.

[KVS] Redis入門

| Comments



Redisは、KVS(Key-Value Store)の一種。
Web-site :
Current stable : 2.8.8
License : BSD

[Git] Tagging in Git

| Comments

These are some commands I use when taggin in git.

Or say…some commands I will be using, since I haven’t really started using them.

Work flow of git in my environment.

  • debugging in master branch
  • little bug fix in master branch
  • new branches for major fix/new features
(beware that I’m developing alone)

What I want to accomplish

  • I want to tag the source before releasing
  • I want to maintain files(add/delete/change revision) in exisisting tags
  • I want to accomplish this easily
  • I want to learn git