2014-03-25 90 views
1

我通過以下視頻安裝Ruby -Ruby on Rails的在Windows 7

https://www.youtube.com/watch?v=y0X7SUfF928&list=PLcwklDOKWhc-k8VsT-ixbAY0TdQI5JLoW

previosly我得到這些錯誤

不正確MySQL客戶端庫版本的寶石被編譯爲6.0。 0

然後我跟着這個鏈接 mysql2 gem compiled for wrong mysql client library

但現在我得到這些 -

c:/row/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require 
': cannot load such file -- mysql2/mysql2 (LoadError) 
     from c:/row/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:5 
5:in `require' 
     from c:/row/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.15/lib/mysql2.rb 
:8:in `<top (required)>' 
     from c:/row/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:1 
35:in `require' 
     from c:/row/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:1 
35:in `rescue in require' 
     from c:/row/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:1 
44:in `require' 
     from test.rb:1:in `<main>' 

請幫我...。

回答

0

在那個視頻,他們都提到一個文件row.bat

我剛剛更改的行的序列..

set PATH=c:\windows\system32;c:\windows 
set PATH=%PATH%;C:\row\mysql-connector-c-noinstall-6.0.2-win32\lib 
set PATH=%PATH%;c:\row\Ruby200\bin 
set PATH=%PATH%;C:\Program Files (x86)\MySQL\MySQL Server 5.1\bin 
start "Rails on windows" /D c:\row 

而其現在的工作

1

您似乎有MYSQL C-Connector library錯誤的版本安裝

你需要this oneenter image description here

基本上,Windows 7的不來幫助創業板運行所需的任何MYSQL的頭文件。您需要安裝32位版本MYSQL C-連接器,然後使用這個命令來安裝寶石:

gem install mysql2 —platform=ruby — ‘—with-mysql-dir=」C:\mysql-connector-path」’ 
+0

其實我使用MySQL服務器5.1 ... 所以它連接器將是我更好的... ... 6.1或6.0 我已經試過6.0 6.0 – user2991245

+0

你應該嘗試安裝MYSQL C-Connector,看看是否有效:) –

+0

好的嘗試..我將盡快更新你 – user2991245