Cocoapod error, tried to install all the possible way on M1 - cocoapods

I get this error
Downloading template
✔ Copying template
✔ Processing template
✖ Installing CocoaPods dependencies (this may take a few minutes)
✖ Installing CocoaPods dependencies (this may take a few minutes)
error Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.
Please try again manually: "cd ./test/ios && pod install".
CocoaPods documentation: https://cocoapods.org/
When try to install manually i get this error,
oadError - dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle, 9): no suitable image found. Did find:
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle: mach-o, but wrong architecture
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle: mach-o, but wrong architecture - /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi.rb:5:in `rescue in <top (required)>'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi.rb:2:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/ethon-0.14.0/lib/ethon.rb:3:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.0/lib/cocoapods-core/cdn_source.rb:440:in `download_typhoeus_impl_async'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.0/lib/cocoapods-core/cdn_source.rb:372:in `download_and_save_with_retries_async'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.0/lib/cocoapods-core/cdn_source.rb:365:in `download_file_async'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.0/lib/cocoapods-core/cdn_source.rb:338:in `download_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.0/lib/cocoapods-core/cdn_source.rb:284:in `ensure_versions_file_loaded'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.0/lib/cocoapods-core/cdn_source.rb:208:in `search'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.0/lib/cocoapods-core/source/aggregate.rb:83:in `block in search'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.0/lib/cocoapods-core/source/aggregate.rb:83:in `select'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.0/lib/cocoapods-core/source/aggregate.rb:83:in `search'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/resolver.rb:416:in `create_set_from_sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/resolver.rb:385:in `find_cached_set'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/resolver.rb:360:in `specifications_for_dependency'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/resolver.rb:165:in `search_for'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/resolver.rb:267:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/resolver.rb:267:in `sort_by'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/resolver.rb:267:in `sort_by!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/resolver.rb:267:in `sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:60:in `block in sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:77:in `with_no_such_dependency_error_handling'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:59:in `sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:754:in `push_state_for_requirements'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:288:in `push_initial_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:210:in `start_resolution'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:168:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/installer/analyzer.rb:1078:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/installer/analyzer.rb:1076:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/installer.rb:416:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/installer.rb:161:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=dlopen%28%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.4%2Flib%2Fffi_c.bundle%2C+9%29%3A+no+suitable+image+found.++Did+find%3A%0A%09%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.4%2Flib%2Fffi_c.bundle%3A+mach-o%2C+but+wrong+architecture%0A%09%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.4%2Flib%2Fffi_c.bundle%3A+mach-o%2C+but+wrong+architecture+-+%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.4%2Flib%2Fffi_c.bundle&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods...
Searching for inspections failed: undefined method `map' for nil:NilClass

hi this fixed my issue
in a terminal
sudo arch -x86_64 gem install ffi
in the project root
cd ios && arch -x86_64 pod install && cd ../

For anyone else struggling with this issue, I just found a way to solve it. In addition to running terminal with Rosetta:
Right-click on Terminal in Finder
Get Info
Open with Rosetta
I installed a gem that seems to be related to the symbol not found in the error:
sudo gem install ffi
After doing this, cocoapods runs as expected.

Go to the podfile inside the ios folder and uncomment the line that says platform :ios, '9.0' and set it to platform :ios, '10.0'. MacBook Pro M1

Sebastián López post
This worked for me on Mac.
Now command npx cap update ios work correctly.
A thousand thanks !!

What worked for me was
sudo gem uninstall cocoapods
sudo gem uninstall ffi
brew install cocoapods
pod install
Source :
https://stackoverflow.com/a/72312058/9571770

Related

Pod Install on M1 Error AFTER sudo arch -x86_64 gem install ffi & Ruby Update

I have been researching how to get pod install to work on my M1 but I am still stuck. This issue has come up before and I've tried the following:
Running sudo arch -x86_64 gem install ffi
Updated ruby and setting it to override the path (my ruby version is 3.1)
Running both arch -x86_64 pod install and pod install
Updating Ruby fixed a portion of the errors, but I am still left with this error set when I run pod install
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:34:in `force_encoding': can't modify frozen String (FrozenError)
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:34:in `report'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:66:in `report_error'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:396:in `handle_exception'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:337:in `rescue in run'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:324:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:228:in `initialize_from_file': [Xcodeproj] Unknown object version (56). (RuntimeError)
from /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:113:in `open'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1190:in `block (2 levels) in inspect_targets_to_integrate'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1189:in `each'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1189:in `block in inspect_targets_to_integrate'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1184:in `inspect_targets_to_integrate'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:106:in `analyze'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:416:in `analyze'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:161:in `install!'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in `run'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>'
Do you have any other suggestions to get this working?
This issue can occur because Ruby has not fully compatible with the latest version of Xcode. In order to fix it you need to set the Project Format to an earlier version (try choosing Xcode 13.0) and then run pod install --verbose. Good luck!

pod install fails with "cannot load such file -- xcodeproj"

I recently updated to ruby v 2.6
After upgrading I'm facing issue installing pods with the following error
Traceback (most recent call last):
7: from /usr/local/bin/pod:23:in `<main>'
6: from /usr/local/bin/pod:23:in `load'
5: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:36:in `<top (required)>'
4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
3: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
2: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods.rb:2:in `<top (required)>'
1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- xcodeproj (LoadError)
8: from /usr/local/bin/pod:23:in `<main>'
7: from /usr/local/bin/pod:23:in `load'
6: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:36:in `<top (required)>'
5: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
3: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods.rb:2:in `<top (required)>'
2: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `require': cannot load such file -- xcodeproj (LoadError)
I have tried sudo gem install cocoapods but with no help.
Anyone facing similar issue and found a solution?
Thanking in anticipation.
Seems like you need install gem xcodeproj, run in terminal :
gem install xcodeproj, see here
This happened to me when after doing a tns migrate on NativeScript 6.5, and I had been building fine before the command was run.
I fixed this by running tns doctor which said my cocoapods install was missing. So the tns doctor went into reinstall mode automatically to try and fix the problem, and I let it reinstall cocoapods and xcodeproj.
fissh
Install RVM with \curl -sSL https://get.rvm.io | bash -s stable; restart your shell; install Ruby with rvm install 2.6.
gem install cocoa pods
the do : pod install
this worked for me

Jekyll Build error

I am trying to build a jekyll site with the command jekyll build. When I run the command I get the following error:
/usr/local/share/ruby/gems/2.0/gems/bundler-1.13.1/lib/bundler/rubygems_ext.rb:45:in `full_gem_path': uninitialized constant Bundler::Plugin::API::Source (NameError)
from /usr/share/ruby/vendor_ruby/2.0/rubygems/specification.rb:1393:in `contains_requirable_file?'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:68:in `block in require'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/specification.rb:823:in `block in each'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/specification.rb:822:in `each'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/specification.rb:822:in `each'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:67:in `find'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:67:in `require'
from /usr/local/share/ruby/gems/2.0/gems/bundler-1.13.1/lib/bundler/plugin/api/source.rb:2:in `<top (required)>'
from /usr/local/share/ruby/gems/2.0/gems/bundler-1.13.1/lib/bundler/rubygems_ext.rb:45:in `full_gem_path'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/specification.rb:1393:in `contains_requirable_file?'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:68:in `block in require'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/specification.rb:823:in `block in each'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/specification.rb:822:in `each'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/specification.rb:822:in `each'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:67:in `find'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:67:in `require'
from /usr/local/share/ruby/gems/2.0/gems/bundler-1.13.1/lib/bundler.rb:11:in `<top (required)>'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:135:in `require'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from /usr/local/share/ruby/gems/2.0/gems/jekyll-3.2.1/lib/jekyll/plugin_manager.rb:34:in `require_from_bundler'
from /usr/local/share/ruby/gems/2.0/gems/jekyll-3.2.1/exe/jekyll:9:in `<top (required)>'
from /usr/local/bin/jekyll:23:in `load'
from /usr/local/bin/jekyll:23:in `<main>'
I am running Ruby version 2.2. My server is Amazon Linux AMI. Let me know if there is any other information needed to answer the question!
I ended up figuring this out. Apparently I was missing a javascript environment. Steps:
sudo rm -r Gemfile.lock
nano Gemfile. Add gem 'therubyracer'. Save and exit
bundle install
bundle exec jekyll build
This fixed the problem for me!
I ran into the same issue. This happens when you haven't initialized bundler and jekyll dependencies.
To fix this,
Go to root directory containing your jekyll files
Run jekyll new . --force. This will initialize the current folder with bundler and jekyll dependencies
Now run the server using bundler exec jekyll serve
jekyll new . --force works like git init for a new git repository. See the documentation for more information

Jekyll build failed: Liquid Exception: cannot load such file -- yajl

Just recently skanked my PC, and I've not used Jekyll in a while, or indeed Ruby, however after thinking I'd set up everything correctly, when I try and run...
jekyll build or
jekyll serve
I get this error:
Generating... Liquid Exception: cannot load such file -- yajl/2.0/yajl i
n _posts/2013-09-21-welcome-to-jekyll.markdown
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in `require': c
annot load such file -- yajl/2.0/yajl (LoadError)
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in
`require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/yajl-ruby-1.1.0-x86-mingw32/lib
/yajl/yajl.rb:2:in `<top (required)>'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in
`require'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in
`require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/yajl-ruby-1.1.0-x86-mingw32/lib
/yajl.rb:1:in `<top (required)>'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:118:i
n `require'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:118:i
n `rescue in require'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:124:i
n `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/pygments.rb-0.5.4/lib/pygments/
popen.rb:3:in `<top (required)>'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:114:i
n `require'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:114:i
n `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/pygments.rb-0.5.4/lib/pygments.
rb:1:in `<top (required)>'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:66:in
`require'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:66:in
`require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/tags/hi
ghlight.rb:52:in `render_pygments'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/tags/hi
ghlight.rb:45:in `render'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.4/lib/liquid/block.r
b:106:in `block in render_all'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.4/lib/liquid/block.r
b:93:in `each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.4/lib/liquid/block.r
b:93:in `render_all'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.4/lib/liquid/block.r
b:82:in `render'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.4/lib/liquid/templat
e.rb:124:in `render'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.4/lib/liquid/templat
e.rb:132:in `render!'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/convert
ible.rb:88:in `render_liquid'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/convert
ible.rb:150:in `do_layout'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/post.rb
:259:in `render'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/site.rb
:241:in `block in render'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/site.rb
:240:in `each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/site.rb
:240:in `render'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/site.rb
:39:in `process'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/command
.rb:18:in `process_site'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/command
s/build.rb:23:in `build'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/command
s/build.rb:7:in `process'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/bin/jekyll:77:in `
block (2 levels) in <top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/c
ommand.rb:180:in `call'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/c
ommand.rb:180:in `call'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/c
ommand.rb:155:in `run'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/r
unner.rb:402:in `run_active_command'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/r
unner.rb:66:in `run!'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/d
elegates.rb:7:in `run!'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/i
mport.rb:10:in `block in <top (required)>'
I think it's related to pygments.rb somehow. If i remove the first post that has the syntax highlighting demo, the build works. I've attemped to update pgyments to 0.5.4 but this seemed to make no different. I think got an error that pygments.rb is locked to 0.3.4:
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
You have requested:
pygments.rb ~> 0.5.4
The bundle currently has pygments.rb locked at 0.3.7.
Try running `bundle update pygments.rb`
Can anyone shed any light on this? It's driving me nuts. Running Ruby 2.0.0p353.
I did following
gem install rouge
and then
added following line in the _config.yml
highlighter: rouge
I found this solution from following page's last comment
https://github.com/jekyll/jekyll-help/issues/50
I encountered a similar problem today when trying to setup Octopress/Jekyll.
Here is the solution I found.
Step 1
Go to your ruby gems directory.
In my case it's located at C:/Ruby21/lib/ruby/gems/2.1.0/gems
Look for yajl.
You will see a folder called yajl-ruby-1.1.0-x86-mingw32
You may or may not see one called yajl-ruby-1.2.1
The one with a -ruby-1.1.0-x86-mingw32 tail is the default. And leads to the error.
What we want to use is the other version
Step 2
If you do not have the none mingw32 version, run
gem install yajl-ruby
This will install the latest version.
In my case the latest version was 1.2.1
Step 3
Change the default from the mingw32 version to the current version.
To do so, go to your website's gemfile.lock file
Find the line that says yajl-ruby (1.1.0-x86-mingw32)
and change it to yajl-ruby (1.2.1)
or the respective version you downloaded
Step 4
That's it. It should work now.
Yajl itself is a “small event-driven (SAX-style) JSON parser written in ANSI C.” You are supposed to install it on your Windows box (I’m not sure if there are binary downloads available, possibly you are to download sources and compile them with your preferred C compiler) before trying to install yajl-ruby gem, which is simply the binding to it.
Another option is to install Ruby development kit, refer to this manual for detailed explanation.

After upgrading to Mountain Lion don't work Rails app (Heroku + Git)

Today I upgraded from Snow Leopard to Mountain Lion and when I try to check my Rails app hosted on Heroku
heroku open
I will get this error message:
! Heroku client internal error.
! Search for help at: https://help.heroku.com
! Or report a bug at: https://github.com/heroku/heroku/issues/new
Error: No such file or directory - git --version (Errno::ENOENT)
Backtrace: /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.30.4/lib/heroku/helpers.rb:105:in ``'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.30.4/lib/heroku/helpers.rb:105:in `has_git?'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.30.4/lib/heroku/helpers.rb:110:in `git'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.30.4/lib/heroku/command/base.rb:206:in `git_remotes'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.30.4/lib/heroku/command/base.rb:179:in `extract_app_in_dir'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.30.4/lib/heroku/command/base.rb:31:in `app'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.30.4/lib/heroku/command/apps.rb:269:in `open'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.30.4/lib/heroku/command.rb:193:in `run'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.30.4/lib/heroku/cli.rb:25:in `start'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.30.4/bin/heroku:16:in `<top (required)>'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/bin/heroku:19:in `load'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/bin/heroku:19:in `<main>'
Command: heroku open
Plugins: heroku-sql-console
Version: heroku-gem/2.30.4 (x86_64-darwin10.8.0) ruby/1.9.2
When I try to check the git:
git status
I'll get:
-bash: git: command not found
What happend? The upgrade to the new version of OS X remove Git and Heroku?
EDIT: Ok, so the problem about git solved the Hombrew installation. But then, when I run the app - rails s, I got:
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require': dlopen(/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/rubyeventmachine.bundle, 9): Library not loaded: /opt/local/lib/libssl.1.0.0.dylib (LoadError)
Referenced from: /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/rubyeventmachine.bundle
Reason: image not found - /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/rubyeventmachine.bundle
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/eventmachine.rb:8:in `<top (required)>'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/thin-1.5.0/lib/thin.rb:7:in `<top (required)>'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `require'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `each'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `block in require'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `each'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `require'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.0.21/lib/bundler.rb:122:in `require'
from /Users/adam/rubydev/future_computers/config/application.rb:7:in `<top (required)>'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/commands.rb:53:in `require'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/commands.rb:53:in `block in <top (required)>'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/commands.rb:50:in `tap'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I also tried to add the mentioned gem in the statement - gem "eventmachine" - even if I don't use it in my app, but didn't help me. Still the same error message.
Could anyone help me, please, how to fix this issue?
Thanks you in advance
Go to Link and install homebrew and run
$ brew install git
It seems git is missing and you need it. Something must have broken on the transition - you will probably need to install it again and potentially rvm + ruby - but because they are stored in your home directory you should be ok. Just incase:
$ rvm get stable
$ rvm install 1.9.3
If your rails and heroku gems are missing you might need to download those again too.
The error seems to have come from installing git in system directory and it getting overwritten when you upgraded - go for homebrew so you are safe and it doesnt happen again.

Resources