Passo a passo para a instalação no windows 8.1 64bit
1. Faça o download e instale o MySQL 64bit versão 5.6 (Isso mesmo. O 64bit.)
2. Faça o download do Conector C (mysql-connector-c-6.1.3-win32.zip) e extrai o zip para C:\mysql-connector-c-6.1.3-win32 (Isso mesmo. O de 32bit, pois o railsinstaller é 32bit.)
3. Instale o Ruby 2.0.0 (minha versão: Ruby 2.0.0p195 (2013-05-14) [i386-mingw32])
4. Instale o Ruby Devkit
5. Installe o Rails 4.0.0
6. Crie o projeto
$ rails new projeto
Após criar...
$ cd pasta\do\projeto
7. Instale a gem mysql
$ gem install mysql
8. Instale a gem mysql2 com o comando:
$ gem install mysql2 --platform=ruby -- '--with-mysql-lib=C:\mysql-connector-c-6.1.3-win32\lib --with-mysql-include=C:\mysql-connector-c-6.1.3-win32\include'
7. Instale a gem mysql
$ gem install mysql
8. Instale a gem mysql2 com o comando:
$ gem install mysql2 --platform=ruby -- '--with-mysql-lib=C:\mysql-connector-c-6.1.3-win32\lib --with-mysql-include=C:\mysql-connector-c-6.1.3-win32\include'
9. Instale o bundle do projeto
$ bundle install
Ao visualizar a mensagem:
Successfully installed mysql2-0.3.15
Parsing documentation for mysql2-0.3.15
Installing ri documentation for mysql2-0.3.15
Done installing documentation for mysql2 after 0 seconds
1 gem installed
Significa que a gem mysql2 foi instalada.
A solução a cima serve para os seguintes erros:
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/RailsInstaller/Ruby2.0.0/bin/ruby
--with-mysql-dir
--with-mysql-include=${mysql-dir}/include
--with-mysql-lib=${mysql-dir}/
--with-mysql-dir
--with-mysql-include=${mysql-dir}/include
--with-mysql-lib=${mysql-dir}/lib
Gem files will remain installed in C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/mysql2-0.3.15 for inspection.
Results logged to C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/mysql2-.3.15/ext/mysql2/gem_make.out
Ao visualizar a mensagem:
Successfully installed mysql2-0.3.15
Parsing documentation for mysql2-0.3.15
Installing ri documentation for mysql2-0.3.15
Done installing documentation for mysql2 after 0 seconds
1 gem installed
Significa que a gem mysql2 foi instalada.
A solução a cima serve para os seguintes erros:
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/RailsInstaller/Ruby2.0.0/bin/ruby
--with-mysql-dir
--with-mysql-include=${mysql-dir}/include
--with-mysql-lib=${mysql-dir}/
--with-mysql-dir
--with-mysql-include=${mysql-dir}/include
--with-mysql-lib=${mysql-dir}/lib
Gem files will remain installed in C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/mysql2-0.3.15 for inspection.
Results logged to C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/mysql2-.3.15/ext/mysql2/gem_make.out
Nenhum comentário:
Postar um comentário