gpt4 book ai didi

mysql - Wordpress 到 Jekyll 脚本抛出错误

转载 作者:行者123 更新时间:2023-11-29 02:35:30 27 4
gpt4 key购买 nike

我已经为这个问题苦苦挣扎了一天左右,无法弄清楚发生了什么。我正在尝试运行脚本以将我的 Wordpress .sql 导入 Jekyll 并将所有内容转换为 Markdown 。但是每次我运行脚本(在 Mac 和 Ubuntu 上)时都会出现错误。我不知所措。这是我的终端输出和 gem 列表:

jason@ubuntu:~$ ruby -r './wordpress.rb' -e 'Jekyll::WordPress.process( "#{ENV["DB"]}", "#{ENV["USER"]}", "#{ENV["PASS"]}")'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': LoadError: no such file to load -- mysql (Sequel::AdapterNotFound)
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /var/lib/gems/1.8/gems/sequel-3.22.0/lib/sequel/adapters/mysql.rb:4
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `k_require'
from /var/lib/gems/1.8/gems/sequel-3.22.0/lib/sequel/core.rb:249:in `tsk_require'
from /var/lib/gems/1.8/gems/sequel-3.22.0/lib/sequel/core.rb:72:in `check_requiring_thread'
from /var/lib/gems/1.8/gems/sequel-3.22.0/lib/sequel/core.rb:69:in `synchronize'
from /var/lib/gems/1.8/gems/sequel-3.22.0/lib/sequel/core.rb:69:in `check_requiring_thread'
from /var/lib/gems/1.8/gems/sequel-3.22.0/lib/sequel/core.rb:249:in `tsk_require'
from /var/lib/gems/1.8/gems/sequel-3.22.0/lib/sequel/database/connecting.rb:25:in `adapter_class'
from /var/lib/gems/1.8/gems/sequel-3.22.0/lib/sequel/database/connecting.rb:63:in `connect'
from /var/lib/gems/1.8/gems/sequel-3.22.0/lib/sequel/core.rb:119:in `connect'
from /var/lib/gems/1.8/gems/sequel-3.22.0/lib/sequel/core.rb:282:in `adapter_method'
from /var/lib/gems/1.8/gems/sequel-3.22.0/lib/sequel/core.rb:289:in `mysql'
from ./wordpress.rb:35:in `process'
from -e:1
jason@ubuntu:~$ gem list

*** LOCAL GEMS ***

classifier (1.3.3)
directory_watcher (1.4.0)
fast-stemmer (1.0.0)
jekyll (0.10.0)
liquid (2.2.2)
maruku (0.6.0)
sequel (3.22.0)
syntax (1.0.0)

我正在使用 Paul Stamatiou 的 adapted script .提前感谢您的任何建议!

最佳答案

如果您关注实际的错误消息:

LoadError: no such file to load -- mysql

很明显,您需要安装 mysql gem:

gem install mysql

关于mysql - Wordpress 到 Jekyll 脚本抛出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5687350/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com