jekyll / jekyll-import

:inbox_tray: The "jekyll import" command for importing from various blogs to Jekyll format.
https://import.jekyllrb.com
MIT License
515 stars 316 forks source link

You must install the 'jekyll-import' gem version > 0 to use the 'jekyll import' command. #530

Closed Kugeleis closed 9 months ago

Kugeleis commented 11 months ago

After intalling the importer with gem install jekyll-import I get this error when running jekyll import wordpressdotcom --source ./mysite.WordPress.xml. What's wrong?

Alexconquer commented 11 months ago

Same problem

dana-futa commented 11 months ago

I'm have the same issue with tumblr.

parkr commented 11 months ago

Are you able to run the command as jekyll-import ... with the hyphen - between Jekyll and import?

dana-futa commented 11 months ago

When I do that I get this error: 'jekyll-import' is not recognized as an internal or external command, operable program or batch file.

I've tried uninstalling and reinstalling jekyll-import too.

gem uninstall jekyll-import
gem install jekyll-import

My jekyll-import version given from this command gem list jekyll-import is: jekyll-import (0.22.0)

Kugeleis commented 10 months ago

I did bundle install after the gem install stuff and it worked. my gemfile has

group :jekyll_plugins do
  gem "jekyll-feed", "~> 0.12"
  gem "jekyll-import", "~>0.22"
  gem "hpricot"
  gem "open_uri_redirections"
end
dana-futa commented 10 months ago

Just tried the bundle install but it didn't change my gemfile. It added 3 files, each of type "File". One file called "false", one file called "true", and one file called "html". The false and true files don't have any content. The file named html only contains "Invalid drive specification."

I added gem "jekyll-import", "~>0.22" manually to my gemfile.

group :jekyll_plugins do
  gem "jekyll-feed", "~> 0.12"
  gem "jekyll-import", "~>0.22"
end

When I ran this command to get tumblr posts jekyll import tumblr --url <tumblrUrlHere> --grab_images true --add_highlights true --rewrite_urls true

I got this error:

`block in rewrite_urls_and_redirects': undefined method `encode' for URI:Module (NoMethodError)

            tumblr_url = URI.parse(URI.encode(post[:slug])).path

Since the images are most important, I tried the command without the last two flags: jekyll import tumblr --url <tumblrUrlHere> --grab_images true

I did get this deprecation warning, but it still seemed to work! "Deprecation: The 'url' setting can only be set in your config files."

Alexconquer commented 10 months ago

Hello,

I've found a solution: I used a command from the Pull Requests section: https://github.com/jekyll/jekyll-import/pull/531#issue-2010584397

ruby -r rubygems -e 'require "jekyll-import";JekyllImport::Importers::WordpressDotCom.run({"source" => "wordpress.xml","no_fetch_images" => false, "assets_folder" => "assets" })'

Using this command, the error message in the console indicated a missing gem ;)

For the wordpressdotcom importer, I added:

I think this approach can be adapted for Tumblr or other importers.