Cygwin/Rails

A few notes taken while trying to get Rails working on Cygwin:

  • Stock Ruby works perfectly (so far)
  • Getting gem to work is also standard fare (get tar file, unpack, ruby setup.rb)
  • Installing Rails using gem works first time, but is slow (generating documentation takes a long time)
  • Tests work, but there's no decent database support.
  • The sqlite-ruby gem does not like SQLite3 (which, incidentally, installs and works fine in Cygwin, provided you run configure --disable-tcl and use a separate build directory). I have, in fact, tried gem install sqlite3, but the results were less than optimal. Maybe next time.

The right incantation for building the gem seems to be:

gem install sqlite-ruby -- --with-sqlite-lib=/usr/local/lib \--with-sqlite-include=/usr/local/include

...but it does not like the new "3" suffix on headers and libs.

  • Unpacking sqlite-2.8.16 and installing it (also without Tcl support) worked:
$ gem install sqlite-ruby -- --with-sqlite-lib=/usr/local/lib \> --with-sqlite-include=/usr/local/includeAttempting local installation of 'sqlite-ruby'Local gem file not found: sqlite-ruby*.gemAttempting remote installation of 'sqlite-ruby'Select which gem to install for your platform (i386-cygwin) 1. sqlite-ruby 2.2.3 (mswin32) 2. sqlite-ruby 2.2.3 (ruby) 3. sqlite-ruby 2.2.2 (mswin32) 4. sqlite-ruby 2.2.2 (ruby) 5. sqlite-ruby 2.2.1 (ruby) 6. sqlite-ruby 2.2.1 (mswin32) 7. sqlite-ruby 2.2.0 (mswin32) 8. sqlite-ruby 2.2.0 (ruby) 9. sqlite-ruby 2.1.0 (ruby) 10. sqlite-ruby 2.1.0 (mswin32) 11. sqlite-ruby 2.0.3 (ruby) 12. sqlite-ruby 2.0.2 (ruby) 13. Cancel installation> 2Building native extensions.  This could take a while......Successfully installed sqlite-ruby-2.2.3Installing RDoc documentation for sqlite-ruby-2.2.3...

If you have problems building the native extensions, try doing a rebaseall on a standard Cygwin prompt without any Cygwin-based daemons running.



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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值