Archive for the 'Windows' Category

Outlook 2007 Error: None of the Authentication Methods Supported By This Client Are Supported By Your Server

I was testing Zimbra with several mail client. Everything worked fine (Thunderbird, Mac Mail, …) except outlook. Outlook always complained “None of the Authentication Methods Supported By This Client Are Supported By Your Server”.
I found several hints on the net about how to solve this but none of them helped.
After checking and rechecking the Account settings I noticed that encryption type for SMTP and IMAP where both set to “None” even if you tell outlook to use encryption. So here is what you have to do to get it working:

1. In the account settings click on “More Settings …”

2. On the Advanced Tab, change the encryption type from “none” to what ever works with your server, or just try “auto”

I really can’t understand why “none” is the default … but who understands Microsoft …

Distributing Rails Applications, with migrations

Creating a executable file (.exe for windows for example) from a Ruby on Rails application isn’t something really new. There enough informations about that on the net, the best one can be found here.
Well, then why am I writing this blog? Well the manual from Erik Veenstra ist quite good, but what I didn’t find there anywhere was how to get the migrations done! I want to be able to give this .exe file to someone (or actually I was forced to do it this way) and they should be able to use the application, but when you keep updates in mind then you must have some way to also get migrations working. 

I will be repeating some steps that are already mentioned in the “Distributing Rails Applications” tutorial.
First add this to the top of your environment.rb, this is a bit different then mentioned in the tutorial. Basically it should be working as mentioned in the tutorial, but in the last two days I was trying to solve this problem until late in the night and can’t really remember why I changed it :)

module Rails
  class Configuration
    def database_configuration
      conf = YAML::load(ERB.new(IO.read(database_configuration_file)).result)
      if defined?(TAR2RUBYSCRIPT)
        conf.each do |k, v|
          if v["adapter"] =~ /^sqlite3/
            v["database"] = oldlocation(v["database"]) if v.include?("database")
            v["dbfile"]   = oldlocation(v["dbfile"])   if v.include?("dbfile")
          end
        end
      else
        YAML::load(ERB.new(IO.read(database_configuration_file)).result)
      end
    end
  end
end

Create a init.rn in the root of your application folder, you can remove the three “puts” lines, just added them for debug purposes.

at_exit do
  require "irb"
  require "drb/acl"
  require "sqlite3"
end
 
puts "Running as an RBA." if defined?(TAR2RUBYSCRIPT)
puts "Runing from: " + oldlocation
puts "Runing in: " + newlocation
 
load "mig.rb"
load "script/server"

As you can see there is a new “load” line which load mig.rb before starting the server. Here is where the magic happens.
Actually the mig.rb is nothing but a copy of the rake script with a extra line.

require 'rubygems'
require 'rake'
 
version = ">= 0"
 
ARGV<<"db:migrate"
 
gem 'rake', version
load 'rake'

So what happens is that tar2rubyscript executes init.rb on startup, then the mig.rb is called which always does a rake db:migrate. This is done but manually adding “db:migrate” to ARGV, this has to be done so the script can be started with “load”, starting the script with a system command won’t work!
This is because the environment set up by tar2rubyscript will be missing and your migrations just won’t work.

Thats all! Incredible that for this answer I spend 2 long long nights. But now it works as it should, when starting it without tar2rubyscript it work’s as usual and with tar2rubyscript it works also great and I can have migrations when I send out new software versions. 
The idea is that the same application is intended to run in two different environments, one being a usual ruby on rails environment on Linux with a MySQL Database and the other being sent out via CD and it must run on windows.
I could have made complete installer to install Ruby, Rubygems, SQLite, the Gems I need … and much more. This way it is much much easier and nobody has to install anything, just click the exe, open the browser and start working.

Having fun with windows …

no I am not joking.
I received this today:

1: You can’t create a folder named CON in windows
2: If you create a new file with notepad and write the text “Bush hid the facts” (without the quotes), save it and reopen it, the text is “hidden”.

Well … it might sound like something really bad but it’s just a bug and there is not much behind it. 


to 1. CON like LPT1, COM1 … are DOS devices and somehow windows gets confused and refuses to create the folder.

to 2. The text “Bush hid the facts” is not what causes notepad to hide anything. The problem is that the text is misinterpret as UTF-16, this bug can be reproduced with several sentences, see http://en.wikipedia.org/wiki/Bush_hid_the_facts 

As you can see, these are just software bugs and there is nothing more behind it :)  

Windows XP, with Firewall

72029489.jpg

Shell Shock :)

One Week Back to Windows – OSNews.com

One of the things that has always made Unices so popular and admired was the shells out there. In fact, most operating systems today have some sort of a competent CLI interface. This is for two reasons. Firstly, in order to offer a way to automate repetitive tasks. Secondly, because you may expect to login remotely, without having access to a graphical environment. And thirdly, because there are cases when you will simply discard the GUI, like when running a web server.

Windows sticked to cmd.exe, which is essentially a slightly polished version of command.com. Command.com itself is little more than a CP/M shell clone. So essentially, cmd.exe offers the same facilities which computers were offering 25 years ago, on Z80-based machines. Needless to say, this is very painful



Oh yes how true. I now have to search for some software that can change the size of some images in batch and also watermark them. Since ImageMagik is available for windows it would be quite easy if windows had some usefull shell, but how do you do this on windows?

for ii in *.jpg
do
  convert -resize 600x600 $ii $ii
done

[HowTo] XP + OSX 10

Interested in runing Mac OSX on a normal PC? Don't ask me how to get it running, I have a mac :D but check out the folowing forum post, here you will find an answer. 

[HowTo] XP + OSX 10.4.4-10.4.7 native dual boot – InsanelyMac Forum

Disable Non Genuine Windows Warning Messages

Disable Non Genuine Windows Warning Messages: WGA Workarounds remove WGATray.exe » Digital Inspiration Disable Non Genuine Windows Warning Messages

Got the annoying Windows message to get genuine? Method 2 seems to be the easiest one (no safe mode reboot, not much work no deleting)
But since I have a Mac and my Linux servers, this doesn't really bother me so M$ you won't get a fucking cent from me !

Dear Sir Bill Gates: invoice enclosed

Oh I love this one. Just received this from Moga, an article on TheRegister. I think my colleagues know just too good how it feels to come back from a meeting and find a rebooted PC and all you work is gone. I must say I was lucky until now since I was always in front of the pc as windows wanted to reboot and game me some time to hit a cancel button. This reminds me of a other story. Imagine writing a 300 Pages doc. With the "oh so powerful and much better then OpenOffice" Winword. You save the document and the next day you want to open it and print it, but no no … Winword has other plans, it simply crashes. This happened to my colleague. Thank good I had an older version of OpenOffice installed, I opened the "corrupt" winword .doc file without a problem, saved it again as .doc file for winword (which then had only 1MB instead of 3) and the file could be opened again in winword, without any problem and nothing was missing. Just some tables looked strange, but that was fixed much faster then writing 300 pages from 0.

Thanks Billy for protecting us from Viruses

Oh isn’t this great! This is a old “feature” from outlook but today it once again pissed me off!
Since there are so many stupid users that click on everything they get via email, what does Microsoft do? They add a bug ( called feature at Microsoft ) so that “potential dangerous” file are hidden in outlook and you can’t open them.
So I had to sent such a baaaad file with a .cer extension ( certificate ) which actulay was just a simple text file with some rows of text in it ( a public key ) but hey … this could be such a bad virus so thanks Outlook for protecting me from virus, or rather from blocking me doing my work. But why complain? M$ is sooo much beter and M$ is sooo much cheaper then Linux and open source! yes yes .. the M$ financed study shows it black on white! Linux and OS and GPL is baaad!

Billy & Co ( especialy Steve Balmer ) I wish you die of a real painful death !

Yes, she did it again …

My sister broke her Windows once again! Don’t know if this time she realy did something wrong or if just the windows paches screwed things up.
Anyway the behaivoir of the pc was that the explorer was crashing all the time, I don’t mean the Internet Explorer, I mean the normal stupid explorer. So couldn’t do anysthing with the PC. No network options could be changed, no Controlpanel no nothing ! always just a crash.
Since I had an idea that some windows updates could be the problem I wanted to deinstal them, but how without controlpanel ?
After a fast search over the internet (thank good the internet knows everything!) I found something how I could call just the Software controlpanel so I hoped it didn’t crash also while executing. Well I tried this little command
rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl
and was very happy to receive a software controlpannel where I could deinstall the last 4 patches and rebootet the pc, and everything was back to normal again.
Thanks to this neat site that helped me: http://masterbootrecord.de/english/rundll.php

Next Page »