我創建了一個運行最新Ubuntu的虛擬機,因爲它在我的Windows機器上造成了很多問題。獲取Rails在新的Ubuntu安裝上運行
我安裝了RVM,安裝版本爲1.8.7和1.9.2,默認設置爲1.9.2。我安裝了寶石,安裝了Rails。
如果我嘗試做使用Rails(生成,服務器等)什麼我得到這個錯誤:
You have requested: mysql2 ~> 0.2.6
The bundle currently has mysql2 locked at 0.2.6. Try running
bundle update mysql2
第一個問題,我的Rails應用程序甚至沒有用mysql。它使用SQLite。
無論如何,我運行bundle update mysql2
就像它說......我得到一堆錯誤。他們的開始是這樣的:
Installing mysql2 (0.2.6) with native extensions /home/jamesw/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:533:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/home/jamesw/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
checking for rb_thread_blocking_region()... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lmygcc... no
checking for mysql_query() in -lmysqlclient... 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.
我不擅長服務器設置和這樣的事情。我是一名OS X用戶,但在OS X上無需處理任何此類問題。任何人都可以將我指向正確的方向嗎?
謝謝。我應該意識到這一點。在某些時候,我將需要捆綁,但現在還不行。謝謝! –