亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Rails,MySQL和Snow Leopard

Rails,MySQL和Snow Leopard

慕桂英3389331 2019-12-10 10:56:07
我使用在WWDC上獲得的光盤升級到了雪豹?,F在嘗試運行我的一些Rails應用程序會抱怨sql    (in /Users/coneybeare/Projects/Ambiance/ambiance-server)!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.Importing all sounds in /Users/coneybeare/Projects/Ambiance/ambiance-sounds/Import 32/Compressed/ -- AdirondackPeepers.caf!!! 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!dlopen(/opt/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.bundle, 9): Library not loaded: /usr/local/mysql/lib/libmysqlclient.16.dylib  Referenced from: /opt/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.bundle  Reason: image not found - /opt/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.bundle(See full trace by running task with --trace)我本可以發誓我曾經修復過這個問題。問題是sudo gem install mysql不起作用并給出錯誤: Building native extensions.  This could take a while...ERROR:  Error installing mysql:    ERROR: Failed to build gem native extension./opt/local/bin/ruby extconf.rb install mysqlchecking for mysql_query() in -lmysqlclient... nochecking for main() in -lm... yeschecking for mysql_query() in -lmysqlclient... nochecking for main() in -lz... yeschecking for mysql_query() in -lmysqlclient... nochecking for main() in -lsocket... nochecking for mysql_query() in -lmysqlclient... nochecking for main() in -lnsl... nochecking for mysql_query() in -lmysqlclient... noGem files will remain installed in /opt/local/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.Results logged to /opt/local/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out有沒有人得到mysql在雪豹上使用Rails呢?如果是這樣,您的設置是什么,更好的是,我該怎么做才能重現它?
查看完整描述

3 回答

?
慕容708150

TA貢獻1831條經驗 獲得超4個贊

將mysql重建為64bit或安裝64bit版本很重要,但是您還需要確保將mysql gem的本機部分也重建為64bit(如果您使用的是原始的Intel Core Duo macs,則該方法不適用)。


這是魔術命令:


env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

每當在Snow Leopard上使用本機組件進行gem安裝時,都應如上所述設置ARCHFLAGS。


查看完整回答
反對 回復 2019-12-10
?
繁星淼淼

TA貢獻1775條經驗 獲得超11個贊

我為此花了很長時間,終于在Snow Leopard上使用它。我最終從源代碼安裝了Ruby,RubyGems和MySQL(有關安裝Ruby和RubyGems的信息,請參見Hivelogic教程。MySQL教程位于底部。)我終于可以安裝寶石了,但是我仍然在


dyld: lazy symbol binding failed: Symbol not found: _mysql_init

  Referenced from: /Library/Ruby/Site/1.8/universal-darwin10.0/mysql.bundle

  Expected in: flat namespace


dyld: Symbol not found: _mysql_init

  Referenced from: /Library/Ruby/Site/1.8/universal-darwin10.0/mysql.bundle

  Expected in: flat namespace


Trace/BPT trap

我終于刪除了mysql.bundle(我不知道這是干什么的),這一切都奏效了。


sudo rm -f /Library/Ruby/Site/1.8/universal-darwin10.0/mysql.bundle

希望能對某人有所幫助。


查看完整回答
反對 回復 2019-12-10
  • 3 回答
  • 0 關注
  • 628 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號