Olá pessoal,
estou estudando a apostila RR-71 da Caelum, e estou com a seguinte mensagem:
!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.
rake aborted!
no such file to load – mysql
Baixei esse arquivo ruby-mysql-0.2.6, coloquei na pasta lib mas não consegui nada.
Queria uma ajuda como consegui esse arquivo mysql gem e instala ele?
estou usando windows e estou com o mysql instalado.
Obrigado.
Oi Rodrigo, você já tentou instalar o driver via gem ?
Geralmente o comando citado pelo colega acima funciona.
Porém, no windows, tinha um truque de colocar uma dll do mysql na pasta do ruby.
No linux ainda precisaria de um:
Fica a dica pra quem estiver no Linux.
acredito que instalei da forma certa, mas o problema persiste, vou tentar instalar no ubuntu tb pra ver o que da.
tem um post muito bom nesse endereco: http://www.meupost.com/2009/03/10/problema-do-rails-222-com-o-mysql-em-windows/
[code]
C:\Users\Rodrigo>gem install mysql --no-rdoc --no-ri
Successfully installed mysql-2.8.1-x86-mswin32
1 gem installed
C:\Users\Rodrigo>
C:\Users\Rodrigo>gem list --local
*** LOCAL GEMS ***
fxri (0.3.6)
fxruby (1.6.16)
hpricot (0.6.164)
log4r (1.0.5)
mysql (2.8.1)
ptools (1.1.6)
rake (0.8.1)
ruby-opengl (0.60.0)
test-unit (2.0.1)
win32-api (1.2.1, 1.2.0)
win32-clipboard (0.4.4)
win32-dir (0.3.2)
win32-eventlog (0.5.0)
win32-file (0.5.5)
win32-file-stat (1.3.1)
win32-process (0.5.9)
win32-sapi (0.1.4)
win32-sound (0.4.1)
windows-api (0.2.4)
windows-pr (0.9.3)
C:\Users\Rodrigo>[/code]
valeu pessoal
C:\Users\Rodrigo>gem install mysql
Successfully installed mysql-2.8.1-x86-mswin32
1 gem installed
Installing ri documentation for mysql-2.8.1-x86-mswin32...
No definition for next_result
No definition for field_name
No definition for field_table
No definition for field_def
No definition for field_type
No definition for field_length
No definition for field_max_length
No definition for field_flags
No definition for field_decimals
No definition for time_inspect
No definition for time_to_s
No definition for time_get_year
No definition for time_get_month
No definition for time_get_day
No definition for time_get_hour
No definition for time_get_minute
No definition for time_get_second
No definition for time_get_neg
No definition for time_get_second_part
No definition for time_set_year
No definition for time_set_month
No definition for time_set_day
No definition for time_set_hour
No definition for time_set_minute
No definition for time_set_second
No definition for time_set_neg
No definition for time_set_second_part
No definition for time_equal
No definition for error_errno
No definition for error_sqlstate
Installing RDoc documentation for mysql-2.8.1-x86-mswin32...
No definition for next_result
No definition for field_name
No definition for field_table
No definition for field_def
No definition for field_type
No definition for field_length
No definition for field_max_length
No definition for field_flags
No definition for field_decimals
No definition for time_inspect
No definition for time_to_s
No definition for time_get_year
No definition for time_get_month
No definition for time_get_day
No definition for time_get_hour
No definition for time_get_minute
No definition for time_get_second
No definition for time_get_neg
No definition for time_get_second_part
No definition for time_set_year
No definition for time_set_month
No definition for time_set_day
No definition for time_set_hour
No definition for time_set_minute
No definition for time_set_second
No definition for time_set_neg
No definition for time_set_second_part
No definition for time_equal
No definition for error_errno
No definition for error_sqlstate
C:\Users\Rodrigo>