quinta-feira, 13 de agosto de 2009

Mudar tamanho do Shadow Storage no Win Vista/Win 7

Então você comprou um HD de 1 terabyte que está diminuindo a cada dia? Que diabos está acontecendo?
Ok, acalmem-se, em primeiro lugar isto só parece acontecer no Win Vista, em segundo lugar é fácil de resolver = D.

Abra o prompt de comando como administrador e execute o seguinte:

vssadmin Resize ShadowStorage /On=%windowsdrive%: /For=%windowsdrive%: /MAXSIZE=%tamanhodesejado%

Onde %windowsdrive% é o HD do Windows, por exemplo C ou D, ou qualquer nome que você deu para esse HD, %tamanhodesejado% é o espaço que o Windows usará para os arquivos de recuperação, por exemplo 5GB ou 500MB ou o tamanho desejado.

Você pode usar um outro local em vez de %windowsdrive%, mas lembre-se de colocar um maxsize nele ok?

Ah e o comando a seguir mostra o espaço utilizado para os arquivos de recuperação em todos os HD's que estiverem na máquina:

vssadmin List ShadowStorage

Isso funciona no Windows 7 também = D, no Win XP, exite uma interface para essa tarefa o que torna o comando meio inútil. O Windows 7 não têm problemas com grande espaço utilizado pelos arquivos de recuperação, mas não consegui encontrar a mesma interface do Win XP, se é que ela existe.

Isto é tudo, abraços e até o próximo post!

Change Vista/Win7 ShadowStorage Size

So you brought a new hard disk of 1 terabyte and it's size is decreasing every day? What the hell is happing?
Ok just calm down, first this only appears to happen in Win Vista, second it's easy to solve =D.

Open the command prompt as administrator and execute the following command:

vssadmin Resize ShadowStorage /On=%windowsdrive%: /For=%windowsdrive%: /MaxSize=%wantedsize%

Where %windowsdrive% is your's windows location, like C or D or any names that you gave to your hard disk, %wantedsize% is the size that windows will use as recovery space, like 5GB, 500MB, or your desired space size.

If you wish you could use another location instead of %windowsdrive% but remember to put a maxsize in it ok?

Oh and this command let's you see how much space is used for recovey in all hard disks:
vssadmin List ShadowStorage

This works in Windows 7 too =D, in Win XP you already have an interface for that so this is kind of useless. Windows 7 doesn't have problems of huge default recovery space but I can't find the interface, if exists, anywhere so it's usefull here.

This is all for now, hughs and see you next time!

quinta-feira, 6 de agosto de 2009

MySql 5.1 doesn't work with Ruby!!

I'm starting to develop applications with Ruby On Rails, my enviroment is Windows XP and Aptana Studio 1.2 or Netbeans 6.7, I'll talk about the IDE decision in other post.

Ok so I was reading my ebook, Simply Rails 2 by Patrick Lenz, I got it via email given by the editor's website, and I started to see the chapter about database interaction. When the command db:migrate was executed in the ruby console it returned the following error: "undefined method `each' for #"

First thing to do was to google the error rsrsrsrsr and after a little while in the web, something close to 30 min, I found one solution and one reason to the error.

The reason for that error to happen is that ruby 1.8 and 1.9 are still compiled to work with MySql version 5.0, they say that it might work with latter versions but that isn't my case =[.

So you have some ways to work it around:
First: Roll back your MySql version to 5.0 or earlier. Not a good one, but works.
Second: Put Instant Rails libmySQL.dll file into your ruby/bin directory. Save the old one for eventual needs. That's the one I used and works pretty well with MySql 5.1 and 6.0, at least until now.
Third: Choose another database, okay this isn't the best one but if anything else doesn't work at least there are another databases that are compatible with ruby.

If you have some work around for this problem too please feel free to comment here, or send it to my email vitor.navarro87@gmail.com and I'll make a post with your email in my blog =].

Hope this save others lives to.....