0
votes

I was trying to import wordpress posts to my new jekyll site using these instructions: import.jekyllrb.com/docs/wordpress But when I follow those instructions including sucessfully installing "gem install unidecode sequel mysql2 htmlentities" into /Library/Ruby/Gems/2.0.0/gems/mysql2-0.4.5 like this:

ruby -rubygems -e 'require "jekyll-import";
>     JekyllImport::Importers::WordPress.run({
>       "dbname"   => "database_name",
>       "user"     => "user_name",
>       "password" => "mypassword",
>       "host"     => "localhost",
>       "socket"   => "",
>       "table_prefix"   => "wp_",
>       "site_prefix"    => “utf8”,
>       "clean_entities" => true,
>       "comments"       => false,
>       "categories"     => true,
>       "tags"           => true,
>       "more_excerpt"   => true,
>       "more_anchor"    => true,
>       "extension"      => "html",
>       "status"         => ["publish"]
>     })'

I get this Load Error:

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- jekyll-import (LoadError)  
from   /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'

Is this because my gems are in the wrong place or I installed something incorrectly?

My locations:
gem: /usr/bin/gem
ruby: /usr/bin/ruby
jekyll: /usr/local/bin/jekyll

RubyGems Environment:
- RUBYGEMS VERSION: 2.0.14.1
- RUBY VERSION: 2.0.0 (2015-12-16 patchlevel 648) [universal.x86_64-darwin16]
- INSTALLATION DIRECTORY: /Library/Ruby/Gems/2.0.0
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- universal-darwin-16
- GEM PATHS:
- /Library/Ruby/Gems/2.0.0
- /Users/mfrost/.gem/ruby/2.0.0
- /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/

1

1 Answers

0
votes

It looks like your script can't load the jekyll-import gem. Be sure it's installed following the instructions here: http://import.jekyllrb.com/docs/installation/

If you hit additional errors look at the stack trace for required dependencies during the install.