• 全文搜索

    gem 'sunspot_rails', '~> 1.3.3' gem 'sunspot_solr', '1.3.2' gem 'sunspot'

    sunspot_solr 的 1.3.3 版本稍微有点小问题,没去解决,就用 1.3.2 好了。

  • MYSQL2 GEM:

    下载 mysql-connector-c-noinstall-6.0.2-win32.zip 将 lib\libmysql.dll 解压到 ruby.exe 所在的目录。

  • Windows 32 and x64 port of Redis server, client and utils

    It is made to be as close as possible to original unix version. You can download prebuilt binaries here:

    https://github.com/dmajkic/redis/downloads

  • RMagick 这个 gem,是用来做图片的缩放处理的一个 GEM, windows 编译: 1、需要安装 ImageMagick-6.7.7-Q16 2、然后设置 CPATH 和 LIBRARY_PATH set CPATH=J:\Ruby\ImageMagick-6.7.7-Q16\include set LIBRARY_PATH=J:\Ruby\ImageMagick-6.7.7-Q16\lib 3、再 gem install rmagick

  • GEMFILE 的修改:只贴修改的部分

    #eventmachine 必须用这个版本才能在 windows 下运行,而 thin 会用到 eventmachine gem 'eventmachine', "1.0.0.beta.4.1"

    #禁用 assets 日志 这个 GEM 会定位输出到/dev/null 完全是 unix 的搞法,windows 不行。 #gem 'quiet_assets', :git => 'git://github.com/AgilionApps/quiet_assets.git'

    #生产环境才用这些,unicorn 没法在 windows 下跑。 #group :production do #gem "unicorn" #gem 'dalli', '1.1.1' #end

  • #2 楼 @fredwu 这个预测比较赞成,往后 3 年应该会是一个井喷期。

  • 中文资料太少,或者深入的书籍太少。ruby 或者 rails 的发展和变化太快。中文的资料更加跟不上。比如说你拿个 1 年前的 rails 3.0 的文档在 rails 3.2 上做时就会出现很多问题,初学者都不会解决。

    对于那些 PHPer 来说,没有 STEP BY STEP 的东西他们是不会干的,而拿到一个到处出错的教材他们是会疯掉的,而 ruby 中文基本很少这种资料,或者基本过时。

  • 一群蛋疼的伪科学家

  • 下个项目,用你的这个试试。

  • 键盘才是问题,

  • 正确的语句应该是 alter database mydb character set utf8 COLLATE utf8_unicode_ci ;

  • 用过 10 多年 LINUX 了,不过 LINUX 桌面还是像一坨...嗯,还是不说了。

  • 最近也要用这个,MARK 一下。

  • #13 楼 @Crabby Rails3.2 对应的敏捷开发书 有这个版本吗?[email protected]

  • 建议在 WINDOWS_VMWARE 下用 Rails, 不要装 XWINDOWS.

    用 PUTTY 或者 SECURECRT 连接服务器执行命令行,而不是在 VMWARE 下去运行。

    相当于,把 VMWARE 下的 LINUX 环境的 RAILS 当做 WINDOWS 的一套程序集来做。你可以把 VMWARE_LINUX_RAILS_PACK 等同于 INSTALLRAILS。不再使用.INSTALLRAILS .

    VMWARE 启动后就可以最小化,后台运行了。

  • #6 楼 @ch3n 能举个例子吗?还没有试过不对应 model 的 controller。这应该是个好主意。

  • controller VS model at 2012年05月13日

    #12 楼 @ery 这个原则值得学习,做个记号。

  • 这个方式非常适合传统的 WINDOS 用户,你要是日常一直用 linux 可以无视。

  • powerdesigner 中导出命令行语句的 vba 代码已做好,本来还想加入主键等定义的,貌似命令行不支持了?那样的话,除了生成命令行命令,还要生产一套 db/schema.rb 的代码才完整? $ rails generate model Usage: rails generate model NAME [field:type field:type] [options]

  • 地点长沙 不过这个不需要地点 希望加个网上兼职标签而不是长沙

  • 之前的数据库表还是 powerdesigner 做的,我还得写一段 vbscript 来导出定义。

  • #14 楼 @outman #17 楼 @yangkit 这个思路不错,我准备就这么搞了。必须要跑一遍吧,要不然会少几个 rails 附加的时间字段。

  • 佣金 只是大概基准,您不用关心这点,只要能完成项目,钱不是问题。

  • require 的问题 at 2012年04月05日

    load 和 require 不是一回事。 关键是 1.9 后可能在默认加载路径中,把当前目录给去掉了。 所以, 如果 myfile.rb 中 require 了一个当前目录下的 file2.rb 时,直接运行 ruby myfile.rb 会报错找不到 file2. 需要加一个-I ./的参数,把当前路径给包含进来。运行 ruby -I ./ myfile.rb 就 OK 了。

  • require 的问题 at 2012年04月04日

    在我的 WINDOWS 环境上需要改成 ruby -I .\ 才能运行。

  • require 的问题 at 2012年04月04日
    D:\work\designpatterns\chap03>ruby -e 'puts $:'
    d:/ruby/Ruby1.9.3/lib/ruby/site_ruby/1.9.1
    d:/ruby/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/i386-msvcrt
    d:/ruby/Ruby1.9.3/lib/ruby/site_ruby
    d:/ruby/Ruby1.9.3/lib/ruby/vendor_ruby/1.9.1
    d:/ruby/Ruby1.9.3/lib/ruby/vendor_ruby/1.9.1/i386-msvcrt
    d:/ruby/Ruby1.9.3/lib/ruby/vendor_ruby
    d:/ruby/Ruby1.9.3/lib/ruby/1.9.1
    d:/ruby/Ruby1.9.3/lib/ruby/1.9.1/i386-mingw32
    
    
  • require 的问题 at 2012年04月04日

    Where Ruby Finds Its Modules You use require or load to bring a library module into your Ruby program. Some of these modules are supplied with Ruby, some you installed off the Ruby Application Archive, and some you wrote yourself. How does Ruby find them?

    When Ruby is built for your particular machine, it predefines a set of standard directories to hold library stuff. Where these are depends on the machine in question. You can determine this from the command line with something like:

    % ruby -e 'puts $:' On a typical Linux box, you'll probably find something such as:

    /usr/local/lib/ruby/site_ruby/1.6/i686-linux /usr/local/lib/ruby/site_ruby/1.6 /usr/local/lib/ruby/site_ruby /usr/local/lib/ruby/1.6/i686-linux /usr/local/lib/ruby/1.6 . The site_ruby directories are intended to hold modules and extensions that you've added. The architecture-dependent directories (i686-linux in this case) hold executables and other things specific to this particular machine. All these directories are automatically included in Ruby's search for modules.

    Sometimes this isn't enough. Perhaps you're working on a large project written in Ruby, and you and your colleagues have built a substantial library of Ruby code. You want everyone on the team to have access to all of this code. You have a couple of options to accomplish this. If your program runs at a safe level of zero (see “Locking Ruby in the Safe”), you can set the environment variable RUBYLIB to a list of one or more directories to be searched. (The separator between entries depends on your platform. For Windows, it's a semicolon; for Unix, a colon.) If your program is not setuid, you can use the command-line parameter -I to do the same thing.

    Finally, the Ruby variable $: is an array of places to search for loaded files. This variable is initialized to the list of standard directories, plus any additional ones you specified using RUBYLIB and -I. You can always add additional directories to this array from within your running program.

  • 这是技术区才有这样的统计,不能适用于普通中国社会。

  • #3 楼 @reus 这段脚本,我执行怎么一直报错: ··· D:\work>criss.py quiz.pdf quiz.pdf Traceback (most recent call last): File "D:\work\criss.py", line 88, in main() File "D:\work\criss.py", line 85, in main reform(f) File "D:\work\criss.py", line 50, in reform im = Image.open(f) File "D:\Python27\lib\site-packages\PIL\Image.py", line 1980, in open raise IOError("cannot identify image file") IOError: cannot identify image file ···

  • 7 寸的 kindle 看 PDF 很不爽。必须用 Kindle DX 才行。