(作爲一邊它告訴我,我在這裏有代碼,必須格式化,所以如果有什麼奇怪的東西,因爲它不會讓我發佈,否則)Ruby On Rails,MySQL windows 8.1 64位mysql gem令人沮喪
我在過去的兩天裏實際上重新安裝了Windows 8三次,並且實際上創建了一個與Ubuntu的雙重啓動,這個問題多麼令人沮喪。 (決定學習一個全新的操作系統更煩人,然後試圖解決Windows問題)
所以,我是一般的新編程,但我一直在與紅寶石和鐵軌鬼混,並決定嘗試和得到數據庫的東西工作,每次我遇到同樣的問題,這似乎是某種Windows 64位MySQL的Ruby版本混淆。
我使用Windows 6.1 64紅寶石2.0.0p353(2013年11月22日)[x64的的mingw32]導軌4.0.2與MySQL 5.6
I've installed the devkit and did the test using ruby -rubygems -e "require 'json'; puts JSON.load('[42]').inspect" and it returned 42 and that whole installation seemed to go fine.
導軌安裝安裝紅寶石,所有-v表示我列出的版本。
現在,當我去安裝MySQL的寶石,它給了我這個。
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
C:/Ruby200-x64/bin/ruby.exe extconf.rb
checking for main() in -llibmysql... no
*** 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.
I read up and tried doing this after installing the MySQL c connector. And it returns as follows.
C:\Users\ryan>gem install mysql2 --platform=ruby -- '--with-mysql-dir="C:/mysql-
connector-c-6.1.3-win32/"'
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-mysql-dir="C:/mysql-connector-c-6.1.3-w
in32/"'
This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
C:/Ruby200-x64/bin/ruby.exe extconf.rb --with-mysql-dir="C:/mysql-connector-
c-6.1.3-win32/"
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
-----
Cannot find include dir at C:/mysql-connector-c-6.1.3-win32//include
-----
*** 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.
I have devoted days to this problem, and reinstalled more things than I care to admit. Does anyone have any ideas how I could possibly fix this... ?
確定這是它噴出了現在..
C:\用戶\瑞恩>寶石安裝mysql --platform =紅寶石 - --with-mysql的-DIR = C:\ mysql的-con nector-c-6.1.3-win32 臨時增強PATH以包含DevKit ... 使用以下命令構建本機擴展:'--with-mysql-dir = c:\ mysql-connector-c-6.1.3- wi n32' 這可能需要一段時間... 錯誤:安裝mysql時出錯: 錯誤:無法構建gem本機擴展。
C:/Ruby200-x64/bin/ruby.exe extconf.rb --with-mysql-dir=c:\mysql-connector-c
-6.1.3-Win32的 檢查的main()在-llibmysql ...沒有 * extconf.rb失敗* 不能由於某種原因創建的Makefile,可能缺乏必要的 圖書館和/或標題。檢查mkmf.log文件以獲取更多詳細信息。您可能需要配置選項 。
提供的配置選項: --with-OPT-DIR --without-OPT-DIR --with-OPT-包括 --without-OPT-包括= $ {停用DIR} /包括 --with-opt-lib --without-opt-lib = $ {opt-dir}/lib --with-make-prog --without-make-prog --srcdir =。 --with-mysql-include --with-mysql-include = $ {mysql-dir} /包括 --with MySQL的-LIB --without MySQL的-LIB = $ {的MySQL-DIR}/ --with-libmysqllib --without-libmysqllib
寶石文件將保持安裝在C : /Ruby200-x64/lib/ruby/gems/2.0.0/gems/mysql -2.9.1進行檢查。 結果記錄到C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mysql-2.9.1/ext/mysql_ api/gem_make。out
@ user3256067它是否適合您? – sunil
剛剛醒來,生病告訴你:D – ryancroker
好吧我走了,並確保目錄路徑是相同的(我實際上做了幾次,甚至重命名爲匹配在博客文章中使用的人你鏈接),它每次都以同樣的方式吐出。我把它編輯在上面,它是最後一點 – ryancroker