每个人。我正在使用这个 ruby 脚本将我的 Blogger XML 文件导入 Octopress。初始导入工作正常,解析 XML 并生成 HTML 文件./_posts/
(使用正确的命名约定)。我把这些移到了./source/_posts/
Jekyll 可以解析它们以便在站点中使用。当我尝试使用rake -t generate
时,我收到此错误:
samurailink3@Manacotti:~/Dropbox/Important Backups/Git Repos/samurailink3.com$ rake -t generate
** Invoke generate (first_time)
** Execute generate
## Generating Site with Jekyll
unchanged sass/screen.scss
Configuration from /home/samurailink3/Dropbox/Important Backups/Git Repos/samurailink3.com/_config.yml
Building site: source -> public
/usr/lib/ruby/1.9.1/uri/common.rb:304:in `escape': undefined method `gsub' for 3:Fixnum (NoMethodError)
from /usr/lib/ruby/1.9.1/uri/common.rb:623:in `escape'
from /var/lib/gems/1.9.1/gems/jekyll-0.12.0/lib/jekyll/post.rb:140:in `block in url'
from /var/lib/gems/1.9.1/gems/jekyll-0.12.0/lib/jekyll/post.rb:140:in `map'
from /var/lib/gems/1.9.1/gems/jekyll-0.12.0/lib/jekyll/post.rb:140:in `url'
from /home/samurailink3/Dropbox/Important Backups/Git Repos/samurailink3.com/plugins/sitemap_generator.rb:69:in `location_on_server'
from /home/samurailink3/Dropbox/Important Backups/Git Repos/samurailink3.com/plugins/sitemap_generator.rb:219:in `fill_location'
from /home/samurailink3/Dropbox/Important Backups/Git Repos/samurailink3.com/plugins/sitemap_generator.rb:181:in `fill_url'
from /home/samurailink3/Dropbox/Important Backups/Git Repos/samurailink3.com/plugins/sitemap_generator.rb:146:in `block in fill_posts'
from /home/samurailink3/Dropbox/Important Backups/Git Repos/samurailink3.com/plugins/sitemap_generator.rb:144:in `each'
from /home/samurailink3/Dropbox/Important Backups/Git Repos/samurailink3.com/plugins/sitemap_generator.rb:144:in `fill_posts'
from /home/samurailink3/Dropbox/Important Backups/Git Repos/samurailink3.com/plugins/sitemap_generator.rb:120:in `generate'
from /var/lib/gems/1.9.1/gems/jekyll-0.12.0/lib/jekyll/site.rb:190:in `block in generate'
from /var/lib/gems/1.9.1/gems/jekyll-0.12.0/lib/jekyll/site.rb:189:in `each'
from /var/lib/gems/1.9.1/gems/jekyll-0.12.0/lib/jekyll/site.rb:189:in `generate'
from /var/lib/gems/1.9.1/gems/jekyll-0.12.0/lib/jekyll/site.rb:40:in `process'
from /var/lib/gems/1.9.1/gems/jekyll-0.12.0/bin/jekyll:264:in `<top (required)>'
from /usr/local/bin/jekyll:23:in `load'
from /usr/local/bin/jekyll:23:in `<main>'
有任何想法吗?在我尝试导入之前,一切都运行良好。
另外,如果您想看一下,这里是代码。我在source
分支机构工作。