Posterous theme by Cory Watilo

FreeBSD IP address change

In FreeBSD ip address is written in /etc/rc.conf.

If you changed it and want to restart network interfaces with latest changes, just run

/etc/rc.d/netif restart

But this wouldn’t affect routing. So if you changed default gateway too, you need to run

/etc/rc.d/routing stop
/etc/rc.d/routing start

To view routing table run

netstat -rn

And, finally, to add gateway by hand exec

route add default 192.168.1.254

Many thanks to VIVEK GITE for his post on nixCraft.

Redmine 1.1.1 and rubygems 1.5 issue

After upgrading rubygems Redmine started to display error message

rake aborted!
undefined local variable or method `version_requirements' for #<Rails::GemDependency:0xb7351b0c>

It is described in ticket #7516 of Redmine itself, and workaround is to modify enviroment.rb and add code before initialize section

if Gem::VERSION >= "1.3.6" 
  module Rails
    class GemDependency
      def requirement
        r = super
        (r == Gem::Requirement.default) ? nil : r
      end
    end
  end
end