Arquivo da tag: Windows

Como instalar o Ruby on Rails 3 no Windows 7

 

A maioria dos acessos ao blog são de buscas por como instalar o Rails 3 no Windows 7. No entanto, acabam encontrando a versão 2.3 do Rails. Este post visa atender este público, os que desejam instalar o Rails 3. Comecemos conhecendo o roteiro:

  1. Instalar o Ruby
  2. Atualizar o RubyGems
  3. Instalar o Rails 3
  4. Instalar o MySQL (opcional)
  5. Instalar o SQLite3 (opcional)

Passo 1: Instalar o Ruby

Basta baixar o RubyInstaller e mandar bala. O RubyInstaller pode ser encontrado aqui: http://rubyinstaller.org/download.html. Digo que é mais simples porque não precisaremos compilar o código fonte e instalá-lo… Enquanto escrevo, as versões disponíveis para instalação do Ruby eram 1.8.7 e 1.9.2. Evite instalar o Ruby em uma pasta que contenha espaços, uma vez que isto pode trazer bastantes problemas.

Agora vamos colocar o Ruby no PATH do Windows. Procure, no Painel de Controle, pela tela de Propriedades do Sistema. Nesta tela, clique em ‘Variáveis de ambiente’ e, no bloco ‘Variáveis de sistema’, procure pela variável ‘Path’ e coloque no fim do campo valor o seguinte texto (não esqueça do ponto­e­vírgula) e confirme:

;C:\Ruby187\bin
Teste a instalação com o seguinte comando no prompt de comando: ruby ­v

Passo 2: Atualizar o Ruby Gems

Gems é o sistema de gerenciamento de pacotes utilizado pelo Ruby. Execute o seguinte comando para atualizar o Ruby Gems:
gem update ­­system

Deve levar uns minutinhos pra terminar.

Passo 3: Instalar o Rails

Enfim, chegou a hora de instalar o Rails. Novamente, no prompt de comando, digite o seguinte comando:

 

gem install rails ­­no­ri ­­no­rdoc

Vai demorar um bocado. Aproveite o tempo pra dar uma olhada no que pode ser feito com Rails. Recomendo o guia do Rails (http://guides.rubyonrails.org).

Pronto! Agora você já tem o suficiente para comecçar a programar!

Na verdade, falta um

banco de dados…

Passo 4: Instalar o MySQL

Instalar o MySQL é simples. Basa ir ao site mysql.com, baixar e instalar a versão mais recente. Simples de fazer e utilizar. Uma grande vantagem em usar o MySQL é o conjunto de ferramentas que dão suporte ao MySQL. Para quem não deseja utilizar o MySQL, o SQLite é uma boa saída.

Passo 5: Instalar o SQLite

ro o.

Caso você decida utilizar o SQLite como sistema gerenciador de banco de dados (SGBD) da sua aplicação, será preciso copiar alguns arquivos para o diretório bin onde o Ruby foi instalado, por exemplo, C:\Ruby187\bin\. Vá ao site sqlite.com e baixe os arquivos binários para Windows. Um se chama mais ou menos ‘sqlite­shell­win32­x86­3070500.zip’ e ou outro ’sqlite­dll­win32­x86­3070500.zip’. O primeiro arquivo contém um executável (.exe) utilizado para a manutenção do banco de dados (INSERT, UPDATE, CREATE, DROP, entre outros). O segundo arquivo possui um arquivo .def e uma DLL utilizada pelo Ruby quando o Rails faz chamadas ao banco de dados. Copie os três arquivos (.exe, .def e .dll) para a pasta bin onde o Ruby foi instalado.

Sua aplicação estará pronta para ser executada com o SQLite! Recomendo a extensão do

ux

Magazine Online

json gem installation problem in Ruby on Rails 3.0 on Windows and

usage of DevKit

Posted by firstruby on November 13, 2011
While installaing json gem in Ruby on Rails 3.0 or 3.1, I was getting following error, firstruby@FIRSTRUBY /demo
$ gem install json -v=1.4.6 –platform=ruby –no-ri –no-rdoc

Apesar de o Rails 2.3 estar configurado por padrão para utilizar o SQLite, é preciso instala

ambiente para que funcione, já que nem o Windows nem o Rails trazem o SQLite consig

Firefox “SQLite Manager” como cliente do banco. Quebra um ótimo galho

Fonte: http://gregoriomelo.com/2010/instalando­o­ruby­on­rails­2­3­no­windows­7/ porLin

 

Fetching: json-1.4.6.gem (100%)

:

from ‘http://rubyinstaller.org/downloads’ and follow the instructions
at ‘
http://github.com/oneclick/rubyinstaller/wiki/Development-Kit’ firstruby@FIRSTRUBY /demo

1) Download DevKit file from http://rubyinstaller.org/downloads (DevKit-tdm-32-4.5.2-20110712-1620-sfx.exe)

2) Extract DevKit to path C:\Ruby192\DevKit 3) Goto DevKit installation directory,

cd C:\Ruby192\DevKit

4) Run following command, ruby dk.rb init

It will generate the config.yml file. This config file should include installed Ruby path, like

“C:\Ruby192
5) Run following command,

ruby dk.rb review

6) Run following command, ruby dk.rb install

Reference : https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

ERROR: Error installing json

The ‘json’ native gem requires installed build tools.

Please update your PATH to include build tools or download the DevKit

To fix this problem, need to install Development Kit (DevKit – Its a toolkit that makes it

easy to build and use native C/C++ extensions for Ruby on Windows) as follows,

It is useful to review the list of Rubies to be enhanced to use the DevKit and verify the

changes you made to it are correct.

It is useful to enhance your installed Rubies and makes it easy to build and use native C/C++

extensions such as json.

Windows Server 2012 r2 – Reinstalando o pacote gráfico

[code type=bash]
schtasks.exe /Run /TN “\Microsoft\Windows\Servicing\StartComponentCleanup”
dism.exe /online /Cleanup-Image /StartComponentCleanup
DISM.exe /Online /enable-feature /featurename:NetFx4 /all
DISM.exe /online /enable-feature /featurename:MicrosoftWindowsPowerShell /all

–>>>>No powershell
[code type=bash]
Install-WindowsFeature Server-Gui-Shell

Install-WindowsFeature Server-Gui-Mgmt-Infra

Error 15118: The password does not meet Windows policy requirements because it is not complex enough

I recently ran to a situation on a development machine where I absolutely needed to use a given password in SQL Server and although the provided password was quite long…and impossible to guess…it was still not considered a strong password due to lack of special characters…so I got prompted with the following error:

“Password validation failed. The password does not meet Windows policy requirements because it is not complex enough. (Microsoft SQL Server, Error: 15118)”

The validation requirement process is not part of SQL Server per se, but rather part of Window’s Local Security Policy.

To fix it I went to “Administrative Tools” and launched “Local Security Policy”.

From there: Security Settings –> Account Policies –> Password Policy

Password Validation, SQL Server, Error 15118, Not Complex Enough, Windows Policy, Password Policy, Password must meet complexity requirements, Security Settings

And attempted to disable “Password must meet complexity requirements”…but I wasn’t allowed to modify it as it was locked / grayed out / inactive, and wouldn’t let me change its value, due to a policy enforced through the company’s domain.

I would not recommend modifying these security settings on a production, stage or shared server environments where sensitive data might reside. But this wasn’t the case this time.

Password Validation, SQL Server, Error 15118, Not Complex Enough, Windows Policy, Password Policy, Password must meet complexity requirements, Security Settings

There is still a way to disable this setting without going through Domain Administrator, who would not even consider your request anyways.

Password Validation, SQL Server, Error 15118, Not Complex Enough, Windows Policy, Password Policy, Password must meet complexity requirements, Security Settings

1) Launch command prompt, as Administrator if possible

2) Type secedit /export /cfg c:\somefolder\local.cfg

3) Launch Notepad. Open local.cfg to edit.

4) Where it says “PasswordComplexity=1”, change 1 to 0.

5) While you are here, you could also set the minimum length requirements lower or higher with the “MinimumPasswordLength” key.

6) Save and Close Notepad.

7) At the command prompt, type “secedit /configure /db %windir%\security\local.sdb /cfg c:\somefolder\local.cfg /areas SECURITYPOLICY

8) Close and re-launch “Local Security Policy” window, or just refresh its values.

9) Done…now you can set your less complex, less secure password!

Password Validation, SQL Server, Error 15118, Not Complex Enough, Windows Policy, Password Policy, Password must meet complexity requirements, Security Settings

Written by Ramin Haghighat

How to install Parallels Tools?

Information

This article explains how to install Parallels Tools in Windows virtual machines.

To install Parallels Tools in Ubuntu virtual machines, see KB 113394.


  1. Start your virtual machine.
  2. In Mac menu bar go to Actions > Install Parallels Tools.

  3. Click Continue on the pop-up message to mount an installation image to Windows:
  4. Using Windows DVD drive select Install Parallels Tools:
  5. Click Yes in the User Account Control dialog box:
  6. Installation will now start and you will see the progress bar:
  7. When installation is finished, restart your virtual machine.

If Parallels Tools failed to install, please refer to KB 111730