windows ruby1.9.2 rails 3.1.0rc5 折腾之路

由于各种原因,只能在业余时间学习ruby和rails

再由于各种原因,这次必须在windows平台上折腾rails

拜G大神所赐,问题很快就搞定了... 

 

环境:

 

db:

D:\2chome>mysql -V

mysql  Ver 14.12 Distrib 5.0.27, for Win32 (ia32)

 

app:

ruby :

 

D:\2chome>ruby -v

ruby 1.9.2p290 (2011-07-09) [i386-mingw32]

主要gem:

rails: Rails 3.1.0.rc5

mysql2 (0.3.6)

 

 

步骤

安装  ruby 1.9.2

http://rbudiharso.wordpress.com/2011/03/25/railsinstaller-with-ruby-1-9-2/

安装mysql2

http://www.kyybaventures.com/blog/installing-mysql2-gem-ruby-rails-windows

安装mysql2有些麻烦,列出关键步骤

  1.     copy D:\MySQL\MySQL Connector C 6.0.2\lib\opt  to C:\Ruby192\bin (If you have installed ruby in     different location change the directory accordingly) (不然后面会报D:/RailsInstaller/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.3.6/lib/mysql2.rb:9:in `require': Incorrect MySQL client library version! This gem was compiled for 6.0.0 but the client library is 5.0.27. (RuntimeError) )
  2. gem install mysql2 -- '--with-mysql-lib="D:\MySQL\MySQL Connector C 6.0.2\lib\opt" --with-mysql-include="D:\MySQL\MySQL Connector C 6.0.2\include"'
注释掉 gem therubyracer

   摘要如下: 

   "No, there is no way that I know of to currently install this gem on windows. The problem is that there is currently no pre-compiled version of the libv8 gem for Windows, and the source version is only compatible with *nix. It does not necessarily have to be that way, it just requires somebody taking the time to make the compile work for Windows. https://github.com/fractaloop/libv8

That said, Windows should come with a JScript, the Microsoft JavaScript runtime, which rails (via execjs) will automatically detect and use, so you should be able to just remove your dependency on therubyracer.

As the maintainer of that gem, this would of course make me sad, but it should get you on your way."

 

 

吐槽1:什么时候,能解决些G大神也解决不了的问题呢... 遐想中 :)

吐槽2:今天7夕,由于各种原因,陪不了GF了,GF也陪不了我.... T.T  不过想想还有ruby陪着我....

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值