# Problem with migratiion from blogger

**URL:** <https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801>\
**Category:** Help\
**Created:** [March 23, 2021, 3:19pm UTC](https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801 "2021-03-23T15:19:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mylittlestories](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mylittlestories/32/3356_2.png) [@Mylittlestories](https://talk.jekyllrb.com/u/Mylittlestories)\
**Post date:** [March 23, 2021, 3:19pm UTC](https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801/1 "2021-03-23T15:19:40Z")

</div>

I have successfully create a jekyll site hosted on github. When I try to migrate my contend from blogger I stack on an error. I download the file from blogger and I procceed with this code:

> Blockquote

ruby -r rubygems -e ‘require “jekyll-import”;  
JekyllImport::Importers::Blogger.run({  
“source” =\> “/\_import/blog-03-22-2021.xml”,  
“no-blogger-info” =\> false,  
“replace-internal-link” =\> false,  
})’

> Blockquote

When I hit enter the following error occur:

> Blockquote  
> unknown regexp options - blg  
> … =\> /\_import/blog-03-22-2021.xml,

> Blockquote

Do you have any suggestion?  
Thank you

---

<div class="post-metadata">

**Author:** ![chuckhoupt](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chuckhoupt/32/523_2.png) [@chuckhoupt](https://talk.jekyllrb.com/u/chuckhoupt)\
**Post date:** [March 23, 2021, 4:59pm UTC](https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801/2 "2021-03-23T16:59:42Z")

</div>

What version of Ruby are you using? Jekyll isn’t compatible with Ruby 3 yet.

---

<div class="post-metadata">

**Author:** ![Mylittlestories](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mylittlestories/32/3356_2.png) [@Mylittlestories](https://talk.jekyllrb.com/u/Mylittlestories)\
**Post date:** [March 23, 2021, 6:12pm UTC](https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801/3 "2021-03-23T18:12:02Z")

</div>

Thank you for the reply.  
I am using 2.7.2. I try many times and with different variations with the location of the file, but, with the same results.

---

<div class="post-metadata">

**Author:** ![chuckhoupt](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chuckhoupt/32/523_2.png) [@chuckhoupt](https://talk.jekyllrb.com/u/chuckhoupt)\
**Post date:** [March 23, 2021, 10:48pm UTC](https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801/4 "2021-03-23T22:48:54Z")

</div>

Is there anything more to the error message? For example, a Traceback stack? File and line number for the error?

Also, could you use [Markdown code-blocks](https://docs.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks) for anything copied from the terminal – it just makes it easier to read and copy-paste. Here’s an example:

````
```
this is a code block
```
````

---

<div class="post-metadata">

**Author:** ![Mylittlestories](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mylittlestories/32/3356_2.png) [@Mylittlestories](https://talk.jekyllrb.com/u/Mylittlestories)\
**Post date:** [March 24, 2021, 5:01am UTC](https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801/5 "2021-03-24T05:01:44Z")

</div>

No, I don’t see any other problem on the terminal.  
The full code I use is

* * *

ruby -r rubygems -e ‘require “jekyll-import”;  
JekyllImport::Importers::Blogger.run({  
“source” =\> “/\_import/blog-03-22-2021.xml”,  
“no-blogger-info” =\> false,  
“replace-internal-link” =\> false,  
})’

* * *

and the only error that comes out is

* * *

-e:3: unknown regexp options - blg  
… =\> /\_import/blog-03-22-2021.xml,

* * *

---

<div class="post-metadata">

**Author:** ![chuckhoupt](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chuckhoupt/32/523_2.png) [@chuckhoupt](https://talk.jekyllrb.com/u/chuckhoupt)\
**Post date:** [March 24, 2021, 12:08pm UTC](https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801/6 "2021-03-24T12:08:51Z")

</div>

Thanks. The full error message indicates that the problem is on line 3 of the script (`-e:3`). It looks like Ruby is interpreting part of the source path as a regular expression, but this would only happen if the source path wasn’t quoted.

Double-check that you have plain double-quotes around the source path (not single-quotes, fancy-quotes, etc). Without quoting, Ruby will interpret the `/_import/` as a regular expression. Line 3 should be:

```auto
"source" => "/_import/blog-03-22-2021.xml",

```

---

<div class="post-metadata">

**Author:** ![Mylittlestories](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mylittlestories/32/3356_2.png) [@Mylittlestories](https://talk.jekyllrb.com/u/Mylittlestories)\
**Post date:** [March 24, 2021, 2:55pm UTC](https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801/7 "2021-03-24T14:55:22Z")

</div>

Tnank you for your reply. It seems to come with the same error message. I try many times with the double -quotes but alla the time the same error

* * *

ruby -r rubygems -e ‘require “jekyll-import”;  
JekyllImport::Importers::Blogger.run({  
“source” =\> “/\_import/blog-03-22-2021.xml”,  
“no-blogger-info” =\> false,  
“replace-internal-link” =\> false,  
})’

-e:3: unknown regexp options - blg  
source=\>/\_import/blog-03-22-2021.xml,

* * *

I see on git gist a script for migration

* * *

[Migrate your blogger blog posts to jekyll. (github.com)](https://gist.github.com/kennym/1115810)

* * *

do you think I can use it, and if yes how I can use it on my blog?

Thank you again for your time

---

<div class="post-metadata">

**Author:** ![chuckhoupt](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chuckhoupt/32/523_2.png) [@chuckhoupt](https://talk.jekyllrb.com/u/chuckhoupt)\
**Post date:** [March 24, 2021, 3:27pm UTC](https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801/8 "2021-03-24T15:27:09Z")

</div>

The comments at the bottom of that Migrate script say it is out of date and point to the Blogger importer you’re trying to use, so I don’t think it will work.

Could you please paste your command inside a fenced code-block, so we can see _exactly_ what characters are used for quoting? If you paste the command as plain text, then all the quotes are converted to “fancy quotes” (i.e. asymmetric left and right quotes) which cannot be used on the command line.

A fenced code-block is build by placing a line with a triple-backquote (`````) before and after the pasted command. Start with:

````
```
<paste code here>
```

````

And then copy and paste your command where indicated.

---

<div class="post-metadata">

**Author:** ![chuckhoupt](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chuckhoupt/32/523_2.png) [@chuckhoupt](https://talk.jekyllrb.com/u/chuckhoupt)\
**Post date:** [March 24, 2021, 3:30pm UTC](https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801/9 "2021-03-24T15:30:38Z")

</div>

Another test to try is to copy and paste the command directly from the [Jekyll Blogger import page](https://import.jekyllrb.com/docs/blogger/) and run it. It should produce a file-not-found error as below. If you see a different error, then there is a problem:

```nohighlight
ruby -r rubygems -e 'require "jekyll-import";
    JekyllImport::Importers::Blogger.run({
      "source" => "/path/to/blog-MM-DD-YYYY.xml",
      "no-blogger-info" => false, # not to leave blogger-URL info (id and old URL) in the front matter
      "replace-internal-link" => false, # replace internal links using the post_url liquid tag.
    })'
Traceback (most recent call last):
	2: from -e:2:in `<main>'
	1: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-import-0.20.0/lib/jekyll-import/importer.rb:24:in `run'
/usr/local/lib/ruby/gems/2.7.0/gems/jekyll-import-0.20.0/lib/jekyll-import/importers/blogger.rb:17:in `validate': No such file or directory - File not found: /path/to/blog-MM-DD-YYYY.xml (Errno::ENOENT)

```

---

<div class="post-metadata">

**Author:** ![Mylittlestories](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mylittlestories/32/3356_2.png) [@Mylittlestories](https://talk.jekyllrb.com/u/Mylittlestories)\
**Post date:** [March 24, 2021, 3:45pm UTC](https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801/10 "2021-03-24T15:45:02Z")

</div>

I try to run the command from jekyll and I get this error

```auto
-e:3: unknown regexp option - t
...urce => /path/to/blog-MM-DD-YYYY.xml,

```

---

<div class="post-metadata">

**Author:** ![Mylittlestories](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mylittlestories/32/3356_2.png) [@Mylittlestories](https://talk.jekyllrb.com/u/Mylittlestories)\
**Post date:** [March 24, 2021, 3:46pm UTC](https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801/11 "2021-03-24T15:46:44Z")

</div>

Ok, my exact code I try is this, with the following error

```auto
ruby -r rubygems -e 'require "jekyll-import";
    JekyllImport::Importers::Blogger.run({
      "source" => "/_import/blog-03-22-2021.xml",
      "no-blogger-info" => false, 
      "replace-internal-link" => false, 
    })'
-e:3: unknown regexp options - blg
... => /_import/blog-03-22-2021.xml,

```

---

<div class="post-metadata">

**Author:** ![chuckhoupt](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chuckhoupt/32/523_2.png) [@chuckhoupt](https://talk.jekyllrb.com/u/chuckhoupt)\
**Post date:** [March 24, 2021, 4:19pm UTC](https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801/12 "2021-03-24T16:19:03Z")

</div>

Very odd. When I copy and paste your code I get the expected file-not-found error.

Here’s a quick experiment. These two command just print the path. Do you get the same or different results: (note that `%` is the shell prompt):

```nohighlight
% ruby -e 'p "/_import/blog-03-22-2021.xml"' 
"/_import/blog-03-22-2021.xml"

% ruby -e 'p /_import/blog-03-22-2021.xml' 
-e:1: unknown regexp options - blg
p /_import/blog-03-22-2021.xml

```

---

<div class="post-metadata">

**Author:** ![Mylittlestories](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mylittlestories/32/3356_2.png) [@Mylittlestories](https://talk.jekyllrb.com/u/Mylittlestories)\
**Post date:** [March 24, 2021, 6:53pm UTC](https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801/13 "2021-03-24T18:53:42Z")

</div>

Hello, with both commands I get the same error

#1

```auto
ruby -e 'p "/_import/blog-03-22-2021.xml"'
-e:1: unknown regexp options - blg
p /_import/blog-03-22-2021.xml

```

#2

```auto
ruby -e 'p /_import/blog-03-22-2021.xml'
-e:1: unknown regexp options - blg
p /_import/blog-03-22-2021.xml

```

---

<div class="post-metadata">

**Author:** ![chuckhoupt](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chuckhoupt/32/523_2.png) [@chuckhoupt](https://talk.jekyllrb.com/u/chuckhoupt)\
**Post date:** [March 24, 2021, 7:15pm UTC](https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801/14 "2021-03-24T19:15:11Z")

</div>

Thanks, so somehow the command is getting garbled when pasted. What OS and shell are you using? I’m testing with macOS 11 and zsh, although any unix and sh-compatible shell should work.

---

<div class="post-metadata">

**Author:** ![Mylittlestories](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mylittlestories/32/3356_2.png) [@Mylittlestories](https://talk.jekyllrb.com/u/Mylittlestories)\
**Post date:** [March 24, 2021, 7:32pm UTC](https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801/15 "2021-03-24T19:32:25Z")

</div>

Thank you. I am using windows10 and visual studio code

---

<div class="post-metadata">

**Author:** ![Mylittlestories](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mylittlestories/32/3356_2.png) [@Mylittlestories](https://talk.jekyllrb.com/u/Mylittlestories)\
**Post date:** [March 24, 2021, 7:36pm UTC](https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801/16 "2021-03-24T19:36:54Z")

</div>

Also I try to run the command (only the first line) via cmd with ruby, there I get a diffrent error

```auto
 -r rubygems -e 'require "jekyll-import";

Traceback (most recent call last):
        2: from -e:1:in `<main>'
        1: from D:/programs/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
D:/programs/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- jekyll-import (LoadError)

```

---

<div class="post-metadata">

**Author:** ![chuckhoupt](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chuckhoupt/32/523_2.png) [@chuckhoupt](https://talk.jekyllrb.com/u/chuckhoupt)\
**Post date:** [March 24, 2021, 7:55pm UTC](https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801/17 "2021-03-24T19:55:33Z")

</div>

Great, the commands are meant to be run on the command line. I’m not sure what VS-Code is doing.

To use the converter script, you’ll need the `jekyll-import` gem. Install it with the command:

```nohighlight
gem install jekyll-import

```

Then try running the conversion command again.

---

<div class="post-metadata">

**Author:** ![Mylittlestories](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mylittlestories/32/3356_2.png) [@Mylittlestories](https://talk.jekyllrb.com/u/Mylittlestories)\
**Post date:** [March 25, 2021, 9:12am UTC](https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801/18 "2021-03-25T09:12:48Z")

</div>

Hello again and thank you. So I run the script successfully and then again I run the conversion.  
On the command line I get the folowing:

```auto
ruby -r rubygems -e 'require "jekyll-import";
    **"JekyllImport::Importers::Blogger.run"** ({ ----- here i get the message: syntax of file,catalog name or tag is false
      "source" => "/blog-03-22-2021.xml", ---- here I get the message: "source"' is not recognized as an internal or external command,operable program or batch file.
      "no-blogger-info" => false, ---- here I get the message: "source"' is not recognized as an internal or external command,operable program or batch file.
      "replace-internal-link" => false, ---- here I get the message: "source"' is not recognized as an internal or external command,operable program or batch file.
    })'

 

```

---

<div class="post-metadata">

**Author:** ![chuckhoupt](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chuckhoupt/32/523_2.png) [@chuckhoupt](https://talk.jekyllrb.com/u/chuckhoupt)\
**Post date:** [March 25, 2021, 12:18pm UTC](https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801/19 "2021-03-25T12:18:55Z")

</div>

Possibly the Windows command shell can’t handle line-breaks? Maybe try running the conversion script on one long line. I.e.:

```nohighlight
ruby -r rubygems -e 'require "jekyll-import"; JekyllImport::Importers::Blogger.run({ "source" => "/_import/blog-03-22-2021.xml", "no-blogger-info" => false, "replace-internal-link" => false, })'

```

---

<div class="post-metadata">

**Author:** ![Mylittlestories](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mylittlestories/32/3356_2.png) [@Mylittlestories](https://talk.jekyllrb.com/u/Mylittlestories)\
**Post date:** [March 25, 2021, 3:06pm UTC](https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801/20 "2021-03-25T15:06:48Z")

</div>

I really don’t know, I try on cmd and vs code. I try it also in one line, on cmd

```auto
ruby -r rubygems -e 'require "jekyll-import"; JekyllImport::Importers::Blogger.run({ "source" => "/_import/blog-03-22-2021.xml", "no-blogger-info" => false, "replace-internal-link" => false, })'
-e:1: syntax error, unexpected '=', expecting =>
...rters::Blogger.run({ "source" =, "no-blogger-info" =, "repla...
-e:1: syntax error, unexpected '=', expecting end-of-input
..."source" =, "no-blogger-info" =, "replace-internal-link" =, ...

```

on vs code

```auto
 ruby -r rubygems -e 'require "jekyll-import"; JekyllImport::Importers::Blogger.run({ "source" => "/_import/blog-03-22-2021.xml", "no-blogger-info" => false, "replace-internal-link" => false, })'
-e:1: unknown regexp options - blg
...r.run({ source => /_import/blog-03-22-2021.xml, no-blogger-i...

```

[Next page](https://talk.jekyllrb.com/t/problem-with-migratiion-from-blogger/5801.md?page=2)
