I’ve been wrestling with this problem for a day or so and cannot figure out what’s going on. I’m trying to run a script to import my WordPress .sql into Jekyll and convert everything to markdown. But every time I run the script (on both Mac and Ubuntu) I’m getting an error. I’m at a loss of what to do. Here’s my terminal output and gem list:
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)
I’m using Paul Stamatiou’s adapted script. Thanks ahead of time for any suggestions!
If you focus on the actual error message:
It’s fairly obvious that you need to install the mysql gem: