What should I do to use local development? - github

When I clone the project from https://github.com/daattali/beautiful-jekyll.git on my computer, I use jekyll serve to start the project, but it will some error, what should I do if I want to Local development using jekyll?
the error is:
WARN: Unresolved specs during Gem::Specification.reset:
jekyll-watch (~> 1.1)
rouge (< 3, >= 1.7)
rb-fsevent (>= 0.9.4, ~> 0.9)
rb-inotify (>= 0.9.7, ~> 0.9)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:313:in `check_for_activated_spec!': You have already activated public_suffix 3.0.1, but your Gemfile requires public_suffix 2.0.5. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:31:in `block in setup'
from C:/Ruby24-x64/lib/ruby/2.4.0/forwardable.rb:229:in `each'
from C:/Ruby24-x64/lib/ruby/2.4.0/forwardable.rb:229:in `each'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:26:in `map'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-`enter code here`1.16.0/lib/bundler/runtime.rb:26:in `setup'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler.rb:107:in `setup'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.6.2/lib/jekyll/plugin_manager.rb:50:in `require_from_bundler'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.6.2/exe/jekyll:11:in `<top (required)>'
from C:/Ruby24-x64/bin/jekyll:23:in `load'
from C:/Ruby24-x64/bin/jekyll:23:in `<main>'

I have solved my question.
First: you should add the code to your Gemfile file.
the code is
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]
Then: you use bundle exec jekyll serve to start. After that you can use local development.

Related

How to solve the Cocoapods error when installing for flutter?

When I run flutter doctor an error occured asking to install cocoapods. Then I tried to install cocoapods and the blow error was given. Please help me to solve this error.
thejanisaranaguptha#Thejanis-MacBook-Pro ~ % sudo gem install cocoapods
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /Library/Ruby/Site/2.6.0 -r ./siteconf20210306-2856-1tbjsvn.rb extconf.rb
checking for ffi.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in `with_werror'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1109:in `block in have_header'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1108:in `have_header'
from extconf.rb:10:in `system_libffi_usable?'
from extconf.rb:42:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.14.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.14.2/gem_make.out
if you have Homebrew installed,Try this
brew install cocoapods
reference

Can't deploy a Middleman project on Github... I don't see the repo

Several days I try to deploy Middleman on Github.
When I want to create a repo to have a personnal URL [website].github.io
I write in the console : middleman deploy
I have this message...
➜ newone git:(master) ✗ middleman deploy
WARN: Unresolved specs during Gem::Specification.reset:
thor (< 2.0, >= 0.17.0)
rack (< 3, >= 1.4.5)
tilt (~> 2.0)
activesupport (< 5.1, >= 4.2)
padrino-helpers (~> 0.13.0)
addressable (~> 2, ~> 2.3)
listen (~> 3.0.0)
sass (>= 3.4)
uglifier (~> 3.0)
execjs (~> 2.0)
hashie (~> 3.4)
concurrent-ruby (~> 1.0)
backports (~> 3.6)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/Users/baptiste/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:40:in `block in setup': You have already activated middleman-core 4.2.0, but your Gemfile requires middleman-core 3.3.12. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
from /Users/baptiste/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:25:in `map'
from /Users/baptiste/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:25:in `setup'
from /Users/baptiste/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.13.6/lib/bundler.rb:99:in `setup'
from /Users/baptiste/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.13.6/lib/bundler/setup.rb:10:in `<top (required)>'
from /Users/baptiste/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:119:in `require'
from /Users/baptiste/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:119:in `require'
from /Users/baptiste/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/middleman-core-4.2.0/lib/middleman-core/load_paths.rb:34:in `setup_bundler'
from /Users/baptiste/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/middleman-core-4.2.0/lib/middleman-core/load_paths.rb:15:in `setup_load_paths'
from /Users/baptiste/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/middleman-cli-4.2.0/bin/middleman:10:in `<top (required)>'
from /Users/baptiste/.rbenv/versions/2.2.3/bin/middleman:23:in `load'
from /Users/baptiste/.rbenv/versions/2.2.3/bin/middleman:23:in `<main>'
I really don't know what to do with this error message. Thank you for your help mates.

Troubleshoot chef-server-ctl ruby exception

I just upgraded from Chef 11 to the latest 12.x. Install and upgrade went fine, other than having to remove a ref to redis in a config file. However:
chef-server-ctrl user-create
...barfs with this error:
/opt/opscode/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in `require': cannot load such file -- chef/knife/ec_base (LoadError)
from /opt/opscode/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
from /opt/opscode/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:39:in `require'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/knife-ec-backup-2.0.6/lib/chef/knife/ec_backup.rb:2:in `<top (required)>'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife/core/subcommand_loader.rb:100:in `load'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife/core/subcommand_loader.rb:100:in `block in load_commands'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife/core/subcommand_loader.rb:100:in `each'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife/core/subcommand_loader.rb:100:in `load_commands'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife/core/subcommand_loader.rb:110:in `load_command'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife/core/subcommand_loader.rb:124:in `command_class_from'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife.rb:153:in `subcommand_class_from'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/knife.rb:214:in `run'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/lib/chef/application/knife.rb:148:in `run'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.19/bin/knife:25:in `<top (required)>'
from /opt/opscode/embedded/bin/knife:23:in `load'
from /opt/opscode/embedded/bin/knife:23:in `<main>'
It seems a file got hosed, somehow. ??? I can't find a way to verify all dependencies were installed during the upgrade, or to do a dependencies-only reinstall. What might cause this?
It turns out that trying to debug this issue when you have no clue how many older version of Chef are overlapped in the installation is a useless exercise. Nothing in Chef will try to resolve the dependencies, and the installs for upgrades always assume you want to keep all your old, obsolete stuff. The solution was to make a full backup, then delete every trace of anything related to Chef, then install all the components again and follow the instructions to restore the backup.

Jekyll won't build if gemfile exists

I'm working on my Github Pages site, so need to build it on my local machine. Following their instructions, I have set it up using bundler. However bundler appears to break the Jekyll build.
If I run jekyll new NewSite it creates a new site that can be built using jekyll serve. As soon as I run bundle install, or bundle update, however, Jekyll refuses to run, giving the below error on the "generating" step.
jekyll 3.0.5 | Error: No such file or directory - git remote --verbose
It will then give that same error every time either bundle exec jekyll serve or jekyll serve are called. Further investigation has found that the error goes away if the gemfile file is deleted.
What have I misconfigured?
Update:
I've added a stack trace as requested
I realised it was the gemfile itself that was causing the issue, not the gemfile.lock
Problem turned out to have nothing to do with Windows, so removed references to it
Stack trace:
C:/Ruby22/lib/ruby/gems/2.2.0/gems/jekyll-github-metadata-1.11.1/lib/jekyll-github-metadata/ghp_metadata_generator.rb:32
:in ``': No such file or directory - git remote --verbose (Errno::ENOENT)
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jekyll-github-metadata-1.11.1/lib/jekyll-github-metadata/ghp_metadata_generator.rb:32:in `git_remote_url'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jekyll-github-metadata-1.11.1/lib/jekyll-github-metadata/ghp_metadata_generator.rb:39:in `nwo_from_git_origin_remote'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jekyll-github-metadata-1.11.1/lib/jekyll-github-metadata/ghp_metadata_generator.rb:65:in `nwo'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jekyll-github-metadata-1.11.1/lib/jekyll-github-metadata/ghp_metadata_generator.rb:8:in `generate'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.0.5/lib/jekyll/site.rb:154:in `block in generate'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.0.5/lib/jekyll/site.rb:153:in `each'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.0.5/lib/jekyll/site.rb:153:in `generate'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.0.5/lib/jekyll/site.rb:58:in `process'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.0.5/lib/jekyll/command.rb:28:in `process_site'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.0.5/lib/jekyll/commands/build.rb:60:in `build'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.0.5/lib/jekyll/commands/build.rb:35:in `process'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.0.5/lib/jekyll/commands/serve.rb:26:in `block (2 levels) in init_with_program'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `call'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.0.5/bin/jekyll:17:in `<top (required)>'
from C:/Ruby22/bin/jekyll:23:in `load'
from C:/Ruby22/bin/jekyll:23:in `<main>'
My Gemfile:
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
gem 'safe_yaml', '~> 1.0.4'
gem 'wdm', '~> 0.1.0' if Gem.win_platform?
Ruby version: 2.2.4 32 bit
Bundler version: 1.12.3
Jekyll Version: 3.0.5
This is jekyll-github-metadata gem which is bugging when trying to run a git remote --verbose command on your system (code).
You can try to set a _config.yml variable (documentation) :
repository: username/repo-name

Building Ember.js Fails

I pulled the latest source from github.
I'm trying to build:
stephan#E6520:~/dev/ember.js$ rake
rake aborted!
no such file to load -- net/github-upload
the trace:
.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load'
.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile'
.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile'
.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `block in load_rakefile'
.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `block in run'
.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
.rvm/gems/ruby-1.9.2-p180/bin/rake:19:in `load'
.rvm/gems/ruby-1.9.2-p180/bin/rake:19:in `<main>'
github upload seemed to be missing so
I installed github-upload using the following:
rvm install github-upload --with-openssl-dir=$rvm_path/usr
But i keep having the same error.
I had same issue, try to execute "bundle install" and then "rake" again (hope I remember correctly)
I removed github-upload requirement in the RakeFile.
Then I got other 'errors' i could solve again. By running the suggested bundle install
And now emberjs Builds.