将WordPress转换为Jekyll有一个错误的Ruby MySQL

时间:2012-03-22 05:08:40

标签: ruby wordpress jekyll

➜ henryyan@hy-hp  ~/work/blog/henryyan.github.com git:(master) ✗ ruby -rubygems -e 'require "jekyll/migrators/wordpress"; Jekyll::WordPress.process("wordpress", "root", "root")'
<internal:lib/rubygems/custom_require>:29:in `require': LoadError: no such file to load -- mysql (Sequel::AdapterNotFound)
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/adapters/mysql.rb:4:in `rescue in <top (required)>'
    from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/adapters/mysql.rb:1:in `<top (required)>'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/core.rb:312:in `block in tsk_require'
    from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/core.rb:94:in `block in check_requiring_thread'
    from <internal:prelude>:10:in `synchronize'
    from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/core.rb:91:in `check_requiring_thread'
    from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/core.rb:312:in `tsk_require'
    from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/database/connecting.rb:25:in `adapter_class'
    from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/database/connecting.rb:63:in `connect'
    from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/core.rb:141:in `connect'
    from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/core.rb:345:in `adapter_method'
    from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/core.rb:352:in `mysql'
    from /var/lib/gems/1.9.1/gems/jekyll-0.11.2/lib/jekyll/migrators/wordpress.rb:15:in `process'
    from -e:1:in `<main>'

1 个答案:

答案 0 :(得分:1)

您需要安装mysql gem:

gem install mysql

在其他SO答案上看到相同的错误:Wordpress to Jekyll script throwing error