I am a beginner on jekyll. I am following the documentation advice to Build the site on the preview server.
Here is what a did :
- install the last version of ruby
$ruby -v -> ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
$ gem --version -> 2.6.14
- Install Jekyll
$gem install jekyll bundler -> Version of jekyll : jekyll-3.6.2
When I try to build the site on the preview server (bundle exec jekyll serve) there is the following error :
jekyll 3.6.2 | Error: (/Users/admin/Documents/Perso/Site-Internet/Jekyll/inger/_config.yml): did not find expected key while parsing a block mapping at line 16 column 1
the line 16 is the first line uncommented that shoul be processed. It is this one
title: Inger Hair at Home at Aix en Provence (line 16)
I don't see what can be wrong. Thank you in advance for your answers
Yaml files are sensitive to spaces, in your _config.yml you have:
# Exclude from processing.
# The following items will not be processed, by default. Create a custom list
# to override the default setting.
exclude:
- Gemfile
- Gemfile.lock
- node_modules
- vendor/bundle/
- vendor/cache/
- vendor/gems/
- vendor/ruby/
- Inger-Analytics-feb0aa8b73d1.json
- .gitignore
When it should be:
# Exclude from processing.
# The following items will not be processed, by default. Create a custom list
# to override the default setting.
exclude:
- Gemfile
- Gemfile.lock
- node_modules
- vendor/bundle/
- vendor/cache/
- vendor/gems/
- vendor/ruby/
- Inger-Analytics-feb0aa8b73d1.json
- .gitignore
Note the space before exclude:. Then it should work.
Related
I am trying to use the library pdf2image in a Code Repository on Palantir Foundry and getting the error
pdf2image.exceptions.PDFInfoNotInstalledError: Unable to get page count. Is poppler installed and in PATH?
when using the function convert_from_bytes.
Does anyone know how to reference the poppler path and get rid of this error?
Thanks!
Here is the code:
def extract_pdf_text(input_bytes, language='eng', dpi=200):
pages = convert_from_bytes(input_bytes, dpi)
pdf_pages = ''
for page_index, page in enumerate(pages):
pdf_page = pytesseract.image_to_string(page, lang=language)
pdf_pages = pdf_pages + pdf_page
return pdf_pages
And the meta.yaml for reference:
# If you need to modify the runtime requirements for your package,
# update the 'requirements.run' section in this file
package:
name: "{{ PACKAGE_NAME }}"
version: "{{ PACKAGE_VERSION }}"
source:
path: ../src
requirements:
# Tools required to build the package. These packages are run on the build system and include
# things such as revision control systems (Git, SVN) make tools (GNU make, Autotool, CMake) and
# compilers (real cross, pseudo-cross, or native when not cross-compiling), and any source pre-processors.
# https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#build
build:
- python 3.8.*
- setuptools
# Packages required to run the package. These are the dependencies that are installed automatically
# whenever the package is installed.
# https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#run
run:
- python 3.8.*
- transforms {{ PYTHON_TRANSFORMS_VERSION }}
- transforms-expectations
- transforms-verbs
- pytesseract
- pdfplumber
- googletrans
- regex
- pdf2image
- langdetect
- pandas
- numpy
- selenium
- requests
- pypdf2
- poppler
build:
script: python setup.py install --single-version-externally-managed --record=record.txt
I found the problem when inspecting the CI-Checks. They failed before poppler was pulled. After I cleaned up meta.yaml and the checks succeded everything seems to work fine.
I have no idea why but I am unable to use conda within terminal. Conda command results in "ConfigurationLoadError"
ConfigurationLoadError: Unable to load configuration file.
path: /Users/kiranmarathe/.condarc
reason: invalid yaml at line 2, column 42
kiranmarathe$ cat /Users/kiranmarathe/.condarc
channels:
- defaults
- conda-forge
- bioconda
- http://conda.binstar.org/faircloth-lab
Go to the /Users/kiranmarathe/ path and delete the .condarc file. I think the issue will be resolved.
I am upgrading CocoaPods (0.39.0) to latest version (1.0.1) and moving some directly integrated frameworks (copied in the main project instead of using CocoaPods-spec). I am using XCode (7.2.1).
Following is the podfile that is used with CocoaPods 1.0.1:
platform :ios, '8.0'
target 'ABC-v2' do
# use_framework is required for dynamic frameworks integration.
use_frameworks!
pod 'SSKeychain', '~>1'
pod 'Mantle', '~>1'
pod 'GoogleAPIClient/Drive', '~>1'
pod 'GTMOAuth2', '~>1'
pod 'GTMSessionFetcher'
pod 'libextobjc/EXTScope', '~>0.4'
pod 'Typhoon', '~>3'
# swift framework test, would need this eventually.
#pod 'Alamofire', '~>3'
# PSPDFKit - 5.8.3
pod 'PSPDFKit', podspec:'https://customers.pspdfkit.com/cocoapods/.../latest.podspec'
#disabled it temporarily to separate out xcode build error.
#target :SSS do
# pod 'ABC-iOS-SDK', :path => 'submodules/abc-ios-sdk'
#end
#disabled it temporarily to separate out xcode build error.
#target :TW do
# pod 'ABC-iOS-SDK', :path => 'submodules/abc-ios-sdk'
#end
target :ABCTests do
inherit! :search_paths
pod 'OCMock', '~> 3'
pod 'OCMockito', '~> 1'
pod 'VCRURLConnection', '~> 0.2', :inhibit_warnings => true
end
end
Now I am trying to resolve compile errors upon build, which are related to libraries getting included multiple times.
Referred to CocoaPods Migration Guide at http://blog.cocoapods.org/CocoaPods-1.0-Migration-Guide/
Tried recompiling after complete clean (cmd-alt-shift-k), removing pod files (rm -rf Pods/ podfile.lock) & deleting DerivedData.
Ensured that there is no duplicate *.a files in the Target->Build Phases->Link Binary with Libraries. Upon 'pod install', "Pods_ABC_v2.framework" is added there.
Deleted other targets, such as Widget and an extension & disabled them in podfile as well.
There is directly integrated evernote sdk (evernote-sdk-ios.xcodeproj), which has EVSSKeychain.h/.m files with modified definitions with EV prefix (EVSSKeychainErrorCode, EVSSKeychainErrorBadArguments, etc). Screenshot below:
I believe above evernote sdk isn't causing the errors I am getting; I could try to remove evernote sdk (directly integrated), but I am not sure about it ??
Errors upon compilation:
/path../Pods/SSKeychain/Sources/SSKeychain.h:65:1: Duplicate interface definition for class ‘SSKeychain'
/path../Pods/SSKeychain/Sources/SSKeychain.h:22:27: Redefinition of 'SSKeychainErrorCode'
/path../Pods/SSKeychain/Sources/SSKeychain.h:24:2: Redefinition of enumerator 'SSKeychainErrorBadArguments'
Please help with the ideas to remove these errors?
This was fixed by modifying the import statements for SSKeychain.h
I downloaded the Omega theme and try to start on my MAC:
But i get this error:
Configuration file: /Users/rname/jekyll/hmfaysal-omega-theme-gh-pages/_config.yml
Source: /Users/rname/jekyll/hmfaysal-omega-theme-gh-pages
Destination: /Users/rname/jekyll/hmfaysal-omega-theme-gh-pages/_site
Generating...
Build Warning: Layout 'none' requested in feed.xml does not exist.
jekyll 2.5.3 | Error: Operation not permitted # unlink_internal - /Users/rnagaraj/jekyll/hmfaysal-omega-theme-gh-pages/_site/LICENSE
As per this and this, try deleting the license file.
I have just reinstalled my whole system and started working on my projects again. I used and still use Jekyll in some of them however I have a problem with auto generation using --auto or _config.yml's auto: true. It simply doesn't work. The output for jekyll --server --auto is:
Configuration from /home/rafal/Documents/Projects/ruby-adventure/_config.yml
Auto-regenerating enabled: /home/rafal/Documents/Projects/ruby-adventure -> /home/rafal/Documents/Projects/ruby-adventure/_site
[2013-03-23 19:09:53] regeneration: 1 files changed
[2013-03-23 19:09:53] INFO WEBrick 1.3.1
[2013-03-23 19:09:53] INFO ruby 2.0.0 (2013-02-24) [x86_64-linux]
[2013-03-23 19:09:53] WARN TCPServer Error: Address already in use - bind(2)
[2013-03-23 19:09:53] INFO WEBrick::HTTPServer#start: pid=3288 port=4000
[2013-03-23 19:09:53] regeneration: 1 files changed
[2013-03-23 19:09:54] regeneration: 1 files changed
[2013-03-23 19:09:54] regeneration: 1 files changed
[2013-03-23 19:09:54] regeneration: 1 files changed
[2013-03-23 19:09:54] regeneration: 1 files changed
[2013-03-23 19:09:54] regeneration: 1 files changed
[2013-03-23 19:09:54] regeneration: 1 files changed
The output from jekyll --no-auto --server is:
Configuration from /home/rafal/Documents/Projects/ruby-adventure/_config.yml
Building site: /home/rafal/Documents/Projects/ruby-adventure -> /home/rafal/Documents/Projects/ruby-adventure/_site
Successfully generated site: /home/rafal/Documents/Projects/ruby-adventure -> /home/rafal/Documents/Projects/ruby-adventure/_site
[2013-03-23 19:12:31] INFO WEBrick 1.3.1
[2013-03-23 19:12:31] INFO ruby 2.0.0 (2013-02-24) [x86_64-linux]
[2013-03-23 19:12:31] WARN TCPServer Error: Address already in use - bind(2)
[2013-03-23 19:12:31] INFO WEBrick::HTTPServer#start: pid=3327 port=4000
...so no error pops up. The site generates fine but when I change a file, it isn't auto regenerated. Any ideas why?
Seems to be caused by recent changes to the directory_watcher gem. Rolling the gem back fixed the issue for me:
sudo gem uninstall directory_watcher && sudo gem install directory_watcher -v 1.4.1
I was able to fix this by hard-locking the directory_watcher gem as per #lilakai, but I did it a different way:
Added this line to my gemfile (within the development group):
gem 'directory_watcher', '1.4'
And ran:
bundle update directory_watcher
Everything worked once I did this (as it locked my version to 1.4, which I confirmed via the Gemfile.lock). I prefer managing all of my gems directly through bundler as opposed to through system ruby.
I ran into this problem using the most recent version of Octopress (https://github.com/imathis/octopress) at the time of this post.