FAQ |
Kalender |
|
Ämnesverktyg | Visningsalternativ |
![]() |
#25 | ||
|
|||
Klarade millennium-buggen
|
Citat:
successfully installed.... Kod:
C:\Projects\Conny\Ruby\MySQL2\mysql2-master>gem install mysql2 Fetching: mysql2-0.3.11-x86-mingw32.gem (100%) ====================================================================================================== You've installed the binary version of mysql2. It was built using MySQL Connector/C version 6.0.2. It's recommended to use the exact same version to avoid potential issues. At the time of building this gem, the necessary DLL files where available in the following download: http://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-noinstall-6.0.2-win32.zip/from/pick And put lib\libmysql.dll file in your Ruby bin directory, for example C:\Ruby\bin ====================================================================================================== Successfully installed mysql2-0.3.11-x86-mingw32 Parsing documentation for mysql2-0.3.11-x86-mingw32 unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/mysql2/1.8/mysql2.so, skipping unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/mysql2/1.9/mysql2.so, skipping Installing ri documentation for mysql2-0.3.11-x86-mingw32 1 gem installed C:\Projects\Conny\Ruby\MySQL2\mysql2-master> Körde även koden enligt exempel i ReadMe-filen: Kod:
# File: mysql2_test.rb client = Mysql2::Client.new(:host => "localhost", :database => 'test', :username => "root", :password => '**************') results = client.query("SELECT * FROM players") results.each do |row| puts row end Kod:
C:\Projects\Conny\Ruby\Hello>ruby mysql2_test.rb mysql2_test.rb:1:in `<main>': uninitialized constant Mysql2 (NameError) C:\Projects\Conny\Ruby\Hello> Jag kör senaste version av Ruby dvs 2.0.0p195 Senast redigerad av Conny Westh den 2013-07-04 klockan 00:31 |
||
![]() |
![]() |
|
|