Changes to Gotchas
You are here: Home > Installation Gotchas

Installation Gotchas

(Raw wiki text)
== Instalando SQLite 3 ==

Se você estiver tentando o instalar o SQLite 3 sem sucesso, talvez queira
checar duas coisas:

* Quando tentar instalar a gem sqlite3-ruby em Linux, certifique-se de possuir o pacote de desenvolvimento com os arquivos de cabeçalho do SQLite 3. Na maioria das distribuições, deve ser possível encontrar um pacote com o nome <code>libsqlite3-dev</code> ou algo parecido. A instalação da gem exige a compilação de algumas extensões nativas que não poderá ser feita sem o código-fonte.

* Se você estiver recebendo a mensagem 'sqlite3 não reconhecido como comando interno' em sistemas Windows, talvez você tenha esquecido de listar o diretório onde instalou o SQLite na variável de ambiente PATH

== Falhas de segmentação em Win32 ==

Pode haver falhas de segmentação se o compilador usado na compilação das gems
for diferente daquele usado na distribuição Ruby em Windows. Parece que o projeto
[http://rubyinstaller.rubyforge.org/ One-Click Ruby Installer] usa o Visual C++ 6 para
gerar seus binários, então, se você estiver usando a distribuição deles, é melhor
baixar as gems correspondentes. Se não estiver, procure saber qual o compilador usado.

Quando estiver instalando as gems necessárias para o Motiro, pode ser que você se depare
com uma pergunta como essa

  % gem install popen4
  Select which gem to install for your platform (i486-linux)
  1. POpen4 0.1.1 (win32-1.8.2-VC7)
  2. POpen4 0.1.1 (unix)
  3. POpen4 0.1.1 (win32-1.8.4-VC6)
  4. POpen4 0.1.1 (win32-source)
  5. POpen4 0.1.0 (unix)
  6. POpen4 0.1.0 (win32-1.8.2-VC7)
  7. POpen4 0.1.0 (win32-source)
  8. POpen4 0.1.0 (win32-1.8.4-VC6)
  9. Cancel installation

Neste caso a melhor opção é a terceira, que, além de ser a versão mais nova da gem, foi
compilada com o Visual C++ 6 (como indicado pelo sufixo <code>-VC6</code>)

==Caracteres especiais nos caminhos de instalação==

Você pode experimentar alguns erros desagradáveis quando o Motiro ou suas dependências
estão instaladas em diretórios com espaços no endereço. Não basta que tudo esteja
instalado em diretórios com nomes simples, mas que todo o caminho desde a raiz do sistema
de arquivos esteja livre de espaços e caracteres especiais. As plataformas Windows são
bem notáveis por favorecer este tipo de erro, mas o problema pode acontecer nas melhores
famílias.

Certifique-se de que não há nenhum espaço ou caracter especial no caminho desde a raiz do
seu sistema de arquivos até o local onde está instalado seu interpretador Ruby
(<code>ruby</code>), as bibliotecas SQLite e o Motiro.

--- en -------------------------

== Installing SQLite 3 ==

If SQLite 3 is failing on you during installation or usage, maybe it would
be good to check a few things:

* When trying to install the <code>sqlite3-ruby</code> gem, make sure to have the SQLite 3 development package with the header files. On most distributions, there should be a package named <code>libsqlite3-dev</code> (or something like this). The header files are required for installing the gem because there is an intermediate building step.

* If you see the messagem 'sqlite3 not recognized as internal command' (or something like that) on Windows systems, maybe you forgot to add the SQLite directory on the PATH environment variable.

== Segmentation fault under Win32 ==

There may be segfaults if the compiler used for the gems is different than the one
used for Ruby itselft under Windows. It looks like the 
[http://rubyinstaller.rubyforge.org/ One-Click Ruby Installer] project uses Visual C++
6 for building the binaries, so, if you happen to be using their distro, it is a
good idea to download the matching gems. If you are not, please see what compiler
was used in your Ruby binary and adapt accordingly.

When installing the Motiro required gems, you may stumble across a question like this

  % gem install popen4
  Select which gem to install for your platform (i486-linux)
  1. POpen4 0.1.1 (win32-1.8.2-VC7)
  2. POpen4 0.1.1 (unix)
  3. POpen4 0.1.1 (win32-1.8.4-VC6)
  4. POpen4 0.1.1 (win32-source)
  5. POpen4 0.1.0 (unix)
  6. POpen4 0.1.0 (win32-1.8.2-VC7)
  7. POpen4 0.1.0 (win32-source)
  8. POpen4 0.1.0 (win32-1.8.4-VC6)
  9. Cancel installation

For this gem, the best option is the third one. Besides being the most recent version,
it was compiled with Visual C++ 6 (as show by the suffix <code>-VC6</code>).

==Special characters on the installation paths==

You may experiment some strange errors when Motiro or its dependencies are inside a
directory with spaces on the path. It isn't enough to have everything installed in
directories with simple and short names: the whole path down from the file system root
needs to be free of spaces and other special characters. Windows platforms are much
famous for favouring this kind of error, but the problem may happen in the best
families.

Please be sure that there is no space or other special character on the path from the
file system root to where your stuff is installed. This includes the Ruby interpreter
(<code>ruby</code>), the SQLite libraries and Motiro.

Last update by patodonald at Wed, 14 May 2008 12:06:36 -0400

Edit (requires authentication) | View wiki output | Page history (5 revisions)