Cannot run github pages locally - jekyll

I'm trying to run a basic GitHub page locally on macOS.
Here is my Gemfile:
$cat Gemfile
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
Then I install the dependencies:
$bundle install --path vendor/bundle
As a result, it installs Jekyll 3.8.5.
But when I build the site with bundle exec jekyll build --verbose I get the next error:
Logging at level: debug
Configuration file: /Users/user/personal/my_user_name.github.io/_config.yml
Theme: jekyll-theme-midnight
Theme source: /Users/user/personal/my_user_name.github.io/vendor/bundle/ruby/2.6.0/gems/jekyll-theme-midnight-0.1.1
Invalid theme folder: _includes
GitHub Pages: github-pages v203
GitHub Pages: jekyll v3.8.5
Theme: jekyll-theme-midnight
Theme source: /Users/user/personal/my_user_name.github.io/vendor/bundle/ruby/2.6.0/gems/jekyll-theme-midnight-0.1.1
Invalid theme folder: _includes
Requiring: jekyll-seo-tag
Requiring: jekyll-coffeescript
Requiring: jekyll-commonmark-ghpages
Requiring: jekyll-gist
jekyll 3.8.5 | Error: uninitialized constant Faraday::Error::ClientError
Did you mean? Faraday::ClientError
My machine details:
$sw_vers
ProductName: Mac OS X
ProductVersion: 10.15.2
BuildVersion: 19C57
How can I fix the issue?
P.S.
If I create a jekyll directory from scratch with
$jekyll new myblog
$cd myblog
$jekyll serve
It runs correctly. The only difference I see is that it uses Jekyll 4.0.0
UPDATE:
I have changed the Gemfile to this:
$cat Gemfile
source 'https://rubygems.org'
#gem 'github-pages', group: :jekyll_plugins
gem 'github-pages'
After I run bundle exec jekyll serve --verbose I see:
Logging at level: debug
Configuration file: /Users/user/personal/my_user_name.github.io/_config.yml
Logging at level: debug
Theme: jekyll-theme-midnight
Theme source: /Users/user/personal/my_user_name.github.io/vendor/bundle/ruby/2.6.0/gems/jekyll-theme-midnight-0.1.1
Invalid theme folder: _includes
Requiring: jekyll-seo-tag
Source: /Users/user/personal/my_user_name.github.io
Destination: /Users/user/personal/my_user_name.github.io/_site
Incremental build: disabled. Enable with --incremental
Generating...
EntryFilter: excluded /Gemfile
EntryFilter: excluded /Gemfile.lock
EntryFilter: excluded /vendor/bundle/ruby
Rendering: assets/css/style.scss
Pre-Render Hooks: assets/css/style.scss
Rendering Markup: assets/css/style.scss
Writing: /Users/user/personal/my_user_name.github.io/_site/assets/css/style.css
done in 0.099 seconds.
Requiring: jekyll-watch
Watcher: Ignoring (?-mix:^_config\.yml)
Watcher: Ignoring (?-mix:^_site\/)
Watcher: Ignoring (?-mix:^Gemfile)
Watcher: Ignoring (?-mix:^Gemfile\.lock)
Watcher: Ignoring (?-mix:^vendor\/bundle\/)
Auto-regeneration: enabled for '/Users/user/personal/my_user_name.github.io'
[2020-01-01 17:52:58] INFO WEBrick 1.4.2
[2020-01-01 17:52:58] INFO ruby 2.6.5 (2019-10-01) [x86_64-darwin19]
[2020-01-01 17:52:58] DEBUG WEBrick::HTTPServlet::FileHandler is mounted on /.
[2020-01-01 17:52:58] DEBUG unmount .
[2020-01-01 17:52:58] DEBUG Jekyll::Commands::Serve::Servlet is mounted on .
Server address: http://127.0.0.1:4000
[2020-01-01 17:52:58] INFO WEBrick::HTTPServer#start: pid=65841 port=4000
Server running... press ctrl-c to stop.
[2020-01-01 17:53:27] DEBUG accept: 127.0.0.1:53546
[2020-01-01 17:53:27] DEBUG accept: 127.0.0.1:53547
[2020-01-01 17:53:27] DEBUG Jekyll::Commands::Serve::Servlet is invoked.
[2020-01-01 17:53:30] DEBUG Jekyll::Commands::Serve::Servlet is invoked.
[2020-01-01 17:53:31] DEBUG Jekyll::Commands::Serve::Servlet is invoked.
[2020-01-01 17:53:34] DEBUG Jekyll::Commands::Serve::Servlet is invoked.
[2020-01-01 17:53:35] DEBUG Jekyll::Commands::Serve::Servlet is invoked.
[2020-01-01 17:53:42] DEBUG close: 127.0.0.1:53547
^C[2020-01-01 17:53:55] DEBUG close TCPSocket(127.0.0.1, 4000)
[2020-01-01 17:53:55] INFO going to shutdown ...
[2020-01-01 17:53:56] DEBUG close: 127.0.0.1:53546
[2020-01-01 17:53:56] INFO WEBrick::HTTPServer#start done.
But when I open it in browser I see just a list of directories but not the blog

It looks due to the latest update of faraday - a gem depended by github-pages.
Try this workaround temporarily.
Add the following line to your Gemfile.
gem 'faraday', '~> 0'
Use command bundle update to update the gem(s) with Gemfile.
You may see outputs below:
Fetching faraday 0.17.3 (was 1.0.0)
Installing faraday 0.17.3 (was 1.0.0)
That means gem faraday in ./vendor/bundle has been updated to the latest compatible version with the github-pages.
You can check the version history of faraday at this page on rubygems.org.
Try bundle exec jekyll again.
If it doesn't work yet, try bundle pristine.

Related

3Jekyll .1.6 does not serve on Ubuntu: undefined method `bash_on_windows?' for Jekyll:: Utils:: Platforms: Module

I installed jekyll
sudo gem install jekyll
And then I go into my GitHub repo folder (which has file index.html) and
jekyll serve
But it generates error:
/var/lib/gems/2.5.0/gems/jekyll-3.8.5/lib/jekyll/drops/document_drop.rb:8: warning: already initialized constant
Jekyll::Drops::DocumentDrop::NESTED_OBJECT_FIELD_BLACKLIST
/usr/lib/ruby/vendor_ruby/jekyll/drops/document_drop.rb:8: warning: previous definition of NESTED_OBJECT_FIELD_BLACKLIST was here
/var/lib/gems/2.5.0/gems/jekyll-3.8.5/lib/jekyll/drops/drop.rb:8: warning: already initialized constant Jekyll::Drops::Drop::NON_CONTENT_METHODS
/usr/lib/ruby/vendor_ruby/jekyll/drops/drop.rb:8: warning: previous definition of NON_CONTENT_METHODS was here
Configuration file: none
Configuration file: none
Configuration file: none
Source: /home/chi/eivorjussila.github.io
Destination: /home/chi/eivorjussila.github.io/_site
Incremental build: disabled. Enable with --incremental
Generating...
done in 0.095 seconds.
jekyll 3.1.6 | Error: undefined method `bash_on_windows?' for Jekyll::Utils::Platforms:Module
Anyone knows why?
it seems that i have 2 versions of jekyll.
so what i did was to
sudo apt remove jekyll
sudo apt-get --autoremove
which jekyll
sudo rm /bin../jekyll
and then i reinstall it
sudo gem install jekyll
it works now

Jekyll Serve error. Browser does not display page

After following installation steps for Jekyll I ran
jekyll serve --verbose
I then go to the browser type: 127.0.0.1:4000 (which gives me a The 127.0.0.1 page isn’t working
127.0.0.1 didn’t send any data.
ERR_EMPTY_RESPONSE)
I get the following response from the server log:
2016-09-12 00:59:27] INFO WEBrick 1.3.1
[2016-09-12 00:59:27] INFO ruby 2.2.2 (2015-04-13) [x86_64-darwin14]
[2016-09-12 00:59:27] DEBUG WEBrick::HTTPServlet::FileHandler is mounted on /.
[2016-09-12 00:59:27] DEBUG unmount .
[2016-09-12 00:59:27] DEBUG Jekyll::Commands::Serve::Servlet is mounted on .
Server address: http://127.0.0.1:4000/
[2016-09-12 00:59:27] INFO WEBrick::HTTPServer#start: pid=64929 port=4000
Server running... press ctrl-c to stop.
[2016-09-12 01:00:18] DEBUG accept: 127.0.0.1:56926
[2016-09-12 01:00:18] DEBUG accept: 127.0.0.1:56927
[2016-09-12 01:00:19] DEBUG Jekyll::Commands::Serve::Servlet is invoked.
[2016-09-12 01:00:40] DEBUG close: 127.0.0.1:56927
[2016-09-12 01:00:49] DEBUG close: 127.0.0.1:56926
[2016-09-12 01:00:51] DEBUG accept: 127.0.0.1:56984
[2016-09-12 01:00:51] DEBUG Jekyll::Commands::Serve::Servlet is invoked.
[2016-09-12 01:01:21] DEBUG close: 127.0.0.1:56984
[2016-09-12 01:09:44] DEBUG accept: 127.0.0.1:57192
[2016-09-12 01:09:44] DEBUG Jekyll::Commands::Serve::Servlet is invoked.
Any opinions, ideas ?

heroku mysqltopostgres installation error

I am trying to deploy my php app that uses mysql db to heroku.
I followed instructions here - https://devcenter.heroku.com/articles/heroku-mysql
The sudo gem install mysqltopostgres-0.3.0.gem command executed without errors:
gem build mysqltopostgres.gemspec
Successfully built RubyGem
Name: mysqltopostgres
Version: 0.3.0
File: mysqltopostgres-0.3.0.gem
but when I try to execute the mysqltopostgres command, the following errors occur
mysqltopostgres /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:34:in
'block in setup': You have already activated test-unit 2.5.5, but your
Gemfile requires test-unit 3.2.1. Prepending 'bundle exec' to your
command may solve this. (Gem::LoadError) from
/usr/lib/ruby/vendor_ruby/bundler/runtime.rb:19:in 'setup' from
/usr/lib/ruby/vendor_ruby/bundler.rb:92:in 'setup' from
/usr/lib/ruby/vendor_ruby/bundler/setup.rb:8:in ''
from
/usr/local/lib/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in
'require' from
/usr/local/lib/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in
'require' from
/var/lib/gems/2.3.0/gems/mysqltopostgres-0.3.0/bin/mysqltopostgres:5:in
'' from /usr/local/bin/mysqltopostgres:22:in 'load'
from /usr/local/bin/mysqltopostgres:22:in ''
I then tried to prepend bundle exec:
bundle exec mysqltopostgres
/usr/local/lib/site_ruby/2.3.0/rubygems.rb:270:in 'find_spec_for_exe':
can't find gem mysqltopostgres (>= 0.a) (Gem::GemNotFoundException)
from /usr/local/lib/site_ruby/2.3.0/rubygems.rb:298:in
'activate_bin_path' from /usr/local/bin/mysqltopostgres:22:in
''
Has anyone ever come across these errors?
And I am new to Heroku, and I was building my app on my local apache and now I want to deploy it to heroku.

OpsWorks deploy error - Chef::Exceptions::ChildConvergeError

I'm trying to deploy first RailsApp 4 using OpsWorks and Mysql, following this tutorial: http://ruby.awsblog.com/post/Tx7FQMT084INCR/Deploying-Ruby-on-Rails-Applications-to-AWS-OpsWorks
I followed all as they mention in the tutorial but when I try to deploy the application I get this error:
[2015-01-20T13:36:41+00:00] INFO: Starting chef-zero on port 8889 with repository at repository at /opt/aws/opsworks/current
One version per cookbook
data_bags at /var/lib/aws/opsworks/data/data_bags
nodes at /var/lib/aws/opsworks/data/nodes
[2015-01-20T13:36:41+00:00] INFO: Forking chef instance to converge...
[2015-01-20T13:36:41+00:00] INFO: *** Chef 11.10.4 ***
[2015-01-20T13:36:41+00:00] INFO: Chef-client pid: 2367
[2015-01-20T13:36:41+00:00] INFO: Setting the run_list to ["opsworks_custom_cookbooks::load", "opsworks_custom_cookbooks::execute"] from JSON
[2015-01-20T13:36:41+00:00] WARN: Run List override has been provided.
[2015-01-20T13:36:41+00:00] WARN: Original Run List: [recipe[opsworks_custom_cookbooks::load], recipe[opsworks_custom_cookbooks::execute]]
[2015-01-20T13:36:41+00:00] WARN: Overridden Run List: [recipe[opsworks_custom_cookbooks::load], recipe[opsworks_custom_cookbooks::execute]]
[2015-01-20T13:36:41+00:00] INFO: Run List is [recipe[opsworks_custom_cookbooks::load], recipe[opsworks_custom_cookbooks::execute]]
[2015-01-20T13:36:41+00:00] INFO: Run List expands to [opsworks_custom_cookbooks::load, opsworks_custom_cookbooks::execute]
[2015-01-20T13:36:41+00:00] INFO: Starting Chef Run for rails-app.localdomain
[2015-01-20T13:36:41+00:00] INFO: Running start handlers
[2015-01-20T13:36:41+00:00] INFO: Start handlers complete.
[2015-01-20T13:36:41+00:00] INFO: HTTP Request Returned 404 Not Found: Object not found: /reports/nodes/rails-app.localdomain/runs
[2015-01-20T13:36:46+00:00] INFO: Loading cookbooks [apache2, dependencies, deploy, gem_support, mod_php5_apache2, mysql, nginx, opsworks_agent_monit, opsworks_aws_flow_ruby, opsworks_berkshelf, opsworks_bundler, opsworks_commons, opsworks_custom_cookbooks, opsworks_initial_setup, opsworks_java, opsworks_nodejs, opsworks_rubygems, packages, passenger_apache2, php, rails, ruby, scm_helper, ssh_users, unicorn]
[2015-01-20T13:36:47+00:00] INFO: Not needed with Chef 11.x (x >= 8) anymore.
[2015-01-20T13:36:47+00:00] INFO: Processing directory[/opt/aws/opsworks/current/site-cookbooks] action delete (opsworks_custom_cookbooks::load line 4)
[2015-01-20T13:36:47+00:00] INFO: Processing ruby_block[merge all cookbooks sources] action run (opsworks_custom_cookbooks::load line 12)
[2015-01-20T13:36:47+00:00] INFO: ruby_block[merge all cookbooks sources] called
[2015-01-20T13:36:47+00:00] WARN: Skipping final node save because override_runlist was given
[2015-01-20T13:36:47+00:00] INFO: Chef Run complete in 5.208526833 seconds
[2015-01-20T13:36:47+00:00] INFO: Running report handlers
[2015-01-20T13:36:47+00:00] INFO: Report handlers complete
---
[2015-01-20T13:36:47+00:00] INFO: Starting chef-zero on port 8889 with repository at repository at /opt/aws/opsworks/current
One version per cookbook
data_bags at /var/lib/aws/opsworks/data/data_bags
nodes at /var/lib/aws/opsworks/data/nodes
[2015-01-20T13:36:47+00:00] INFO: Forking chef instance to converge...
[2015-01-20T13:36:47+00:00] INFO: *** Chef 11.10.4 ***
[2015-01-20T13:36:47+00:00] INFO: Chef-client pid: 2507
[2015-01-20T13:36:48+00:00] INFO: Setting the run_list to ["opsworks_custom_cookbooks::load", "opsworks_custom_cookbooks::execute"] from JSON
[2015-01-20T13:36:48+00:00] WARN: Run List override has been provided.
[2015-01-20T13:36:48+00:00] WARN: Original Run List: [recipe[opsworks_custom_cookbooks::load], recipe[opsworks_custom_cookbooks::execute]]
[2015-01-20T13:36:48+00:00] WARN: Overridden Run List: [recipe[deploy::default], recipe[opsworks_stack_state_sync], recipe[deploy::rails], recipe[test_suite], recipe[opsworks_cleanup]]
[2015-01-20T13:36:48+00:00] INFO: Run List is [recipe[deploy::default], recipe[opsworks_stack_state_sync], recipe[deploy::rails], recipe[test_suite], recipe[opsworks_cleanup]]
[2015-01-20T13:36:48+00:00] INFO: Run List expands to [deploy::default, opsworks_stack_state_sync, deploy::rails, test_suite, opsworks_cleanup]
[2015-01-20T13:36:48+00:00] INFO: Starting Chef Run for rails-app.localdomain
[2015-01-20T13:36:48+00:00] INFO: Running start handlers
[2015-01-20T13:36:48+00:00] INFO: Start handlers complete.
[2015-01-20T13:36:48+00:00] INFO: HTTP Request Returned 404 Not Found: Object not found: /reports/nodes/rails-app.localdomain/runs
[2015-01-20T13:36:53+00:00] INFO: Loading cookbooks [apache2, dependencies, deploy, gem_support, mod_php5_apache2, mysql, nginx, opsworks_agent_monit, opsworks_aws_flow_ruby, opsworks_bundler, opsworks_cleanup, opsworks_commons, opsworks_initial_setup, opsworks_java, opsworks_nodejs, opsworks_rubygems, opsworks_stack_state_sync, packages, passenger_apache2, php, rails, ruby, scm_helper, ssh_users, test_suite, unicorn]
[2015-01-20T13:36:53+00:00] INFO: Removing cookbooks/agent_version/templates/default/TARGET_VERSION.erb from the cache; its cookbook is no longer needed on this client.
[2015-01-20T13:36:53+00:00] INFO: Removing cookbooks/agent_version/recipes/default.rb from the cache; its cookbook is no longer needed on this client.
[2015-01-20T13:36:53+00:00] INFO: Removing cookbooks/agent_version/attributes/default.rb from the cache; its cookbook is no longer needed on this client.
[2015-01-20T13:36:53+00:00] INFO: Removing cookbooks/agent_version/attributes/customize.rb from the cache; its cookbook is no longer needed on this client.
[2015-01-20T13:36:53+00:00] INFO: Removing cookbooks/agent_version/metadata.rb from the cache; its cookbook is no longer needed on this client.
[2015-01-20T13:36:53+00:00] INFO: Removing cookbooks/opsworks_ganglia/recipes/monitor-mysql.rb from the cache; its cookbook is no longer needed on this client.
[2015-01-20T13:36:53+00:00] INFO: Removing cookbooks/opsworks_ganglia/recipes/configure-client.rb from the cache; its cookbook is no longer needed on this client.
[2015-01-20T13:36:53+00:00] INFO: Removing cookbooks/opsworks_ganglia/recipes/monitor-haproxy.rb from the cache; its cookbook is no longer needed on this client.
[2015-01-20T13:36:53+00:00] INFO: Removing cookbooks/opsworks_ganglia/recipes/views.rb from the cache; its cookbook is no longer needed on this client.
[2015-01-20T13:36:53+00:00] INFO: Removing cookbooks/opsworks_ganglia/recipes/monitor-fd-and-sockets.rb from the cache; its cookbook is no longer needed on this client.
[2015-01-20T13:36:53+00:00] INFO: Removing cookbooks/opsworks_ganglia/recipes/server.rb from the cache; its cookbook is no longer needed on this client.
[2015-01-20T13:36:53+00:00] INFO: Removing cookbooks/opsworks_ganglia/recipes/bind-mount-data.rb from the cache; its cookbook is no longer needed on this client.
[2015-01-20T13:36:53+00:00] INFO: Removing cookbooks/opsworks_ganglia/recipes/deploy.rb from the cache; its cookbook is no longer needed on this client.
[2015-01-20T13:36:53+00:00] INFO: Removing cookbooks/opsworks_ganglia/recipes/configure-server.rb from the cache; its cookbook is no longer needed on this client.
[2015-01-20T13:36:53+00:00] INFO: Removing
..... removed some code for stackoverflow body limitation
file[/home/deploy/.ssh/config] action touch (deploy::rails line 16)
[2015-01-20T13:36:54+00:00] INFO: file[/home/deploy/.ssh/config] updated atime and mtime to 2015-01-20 13:36:54 +0000
[2015-01-20T13:36:54+00:00] INFO: Processing execute[echo 'StrictHostKeyChecking no' > /home/deploy/.ssh/config] action run (deploy::rails line 23)
[2015-01-20T13:36:54+00:00] INFO: Processing template[/home/deploy/.ssh/id_dsa] action create (deploy::rails line 27)
[2015-01-20T13:36:54+00:00] INFO: Processing directory[/srv/www/ariadna/shared/cached-copy] action delete (deploy::rails line 48)
[2015-01-20T13:36:54+00:00] INFO: directory[/srv/www/ariadna/shared/cached-copy] deleted /srv/www/ariadna/shared/cached-copy recursively
[2015-01-20T13:36:54+00:00] INFO: Processing ruby_block[change HOME to /home/deploy for source checkout] action run (deploy::rails line 56)
[2015-01-20T13:36:54+00:00] INFO: ruby_block[change HOME to /home/deploy for source checkout] called
[2015-01-20T13:36:54+00:00] INFO: Processing deploy[/srv/www/ariadna] action deploy (deploy::rails line 65)
[2015-01-20T13:36:56+00:00] INFO: deploy[/srv/www/ariadna] cloning repo git#bitbucket.org:viktorpr7/ariadna.git to /srv/www/ariadna/shared/cached-copy
[2015-01-20T13:36:59+00:00] INFO: deploy[/srv/www/ariadna] checked out branch: master onto: deploy reference: 438d556fa34ec3590ba1fecca64fd31241379516
[2015-01-20T13:36:59+00:00] INFO: deploy[/srv/www/ariadna] synchronizing git submodules
[2015-01-20T13:36:59+00:00] INFO: deploy[/srv/www/ariadna] enabling git submodules
[2015-01-20T13:36:59+00:00] INFO: deploy[/srv/www/ariadna] set user to deploy
[2015-01-20T13:36:59+00:00] INFO: deploy[/srv/www/ariadna] set group to www-data
[2015-01-20T13:36:59+00:00] INFO: deploy[/srv/www/ariadna] copied the cached checkout to /srv/www/ariadna/releases/20150120133654
[2015-01-20T13:36:59+00:00] INFO: deploy[/srv/www/ariadna] set user to deploy
[2015-01-20T13:36:59+00:00] INFO: deploy[/srv/www/ariadna] set group to www-data
[2015-01-20T13:36:59+00:00] INFO: deploy[/srv/www/ariadna] running callback before_migrate
[2015-01-20T13:36:59+00:00] INFO: deploy[/srv/www/ariadna] created directories before symlinking: tmp,public,config
[2015-01-20T13:36:59+00:00] INFO: deploy[/srv/www/ariadna] linked shared paths into current release: system => public/system, pids => tmp/pids, log => log
[2015-01-20T13:36:59+00:00] INFO: deploy[/srv/www/ariadna] made pre-migration symlinks
[2015-01-20T13:36:59+00:00] INFO: deploy[/srv/www/ariadna] set user to deploy
[2015-01-20T13:36:59+00:00] INFO: deploy[/srv/www/ariadna] set group to www-data
[2015-01-20T13:36:59+00:00] INFO: Gemfile detected. Running bundle install.
[2015-01-20T13:36:59+00:00] INFO: sudo su - deploy -c 'cd /srv/www/ariadna/releases/20150120133654 && /usr/local/bin/bundle install --path /home/deploy/.bundler/ariadna --without=test development'
[2015-01-20T13:37:00+00:00] INFO:
Using rake (10.4.2)
Using i18n (0.7.0)
Using minitest (4.7.5)
Using multi_json (1.10.1)
Using thread_safe (0.3.4)
Using tzinfo (0.3.42)
Using activesupport (4.0.1)
Using builder (3.1.4)
Using erubis (2.7.0)
Using rack (1.5.2)
Using rack-test (0.6.3)
Using actionpack (4.0.1)
Using mime-types (1.25.1)
Using polyglot (0.3.5)
Using treetop (1.4.15)
Using mail (2.5.4)
Using actionmailer (4.0.1)
Using activemodel (4.0.1)
Using activerecord-deprecated_finders (1.0.3)
Using arel (4.0.2)
Using activerecord (4.0.1)
Using acts_as_tree (2.1.0)
Using addressable (2.3.6)
Using bcrypt (3.1.7)
Using bcrypt-ruby (3.1.5)
Using coffee-script-source (1.8.0)
Using execjs (2.2.2)
Using coffee-script (2.3.0)
Using thor (0.19.1)
Using railties (4.0.1)
Using coffee-rails (4.0.1)
Using orm_adapter (0.5.0)
Using warden (1.2.3)
Using devise (3.2.3)
Using dragonfly (1.0.7)
Using json (1.8.2)
Using rdoc (4.2.0)
Using rest-client (1.6.8)
Using geo_ip (0.5.0)
Using tilt (1.4.1)
Using haml (4.0.5)
Using haml-rails (0.5.3)
Using hike (1.2.3)
Using jbuilder (1.5.3)
Using jquery-rails (3.1.2)
Using kgio (2.9.2)
Using mysql2 (0.3.14)
Using nprogress-rails (0.1.6.5)
Using paranoia (2.0.4)
Using bundler (1.5.3)
Using sprockets (2.12.3)
Using sprockets-rails (2.0.1)
Using rails (4.0.1)
Using raindrops (0.13.0)
Using sass (3.2.19)
Using sass-rails (4.0.5)
Using sdoc (0.4.1)
Using simple_form (3.1.0)
Using stringex (2.5.2)
Using themes_on_rails (0.3.0)
Using turbolinks (2.5.3)
Using uglifier (2.7.0)
Using unicorn (4.8.3)
Your bundle is complete!
Gems in the groups test and development were not installed.
It was installed into /home/deploy/.bundler/ariadna
[2015-01-20T13:37:00+00:00] INFO: Processing template[/srv/www/ariadna/shared/config/database.yml] action create (/var/lib/aws/opsworks/cache.stage2/cookbooks/deploy/definitions/opsworks_deploy.rb line 115)
[2015-01-20T13:37:00+00:00] INFO: deploy[/srv/www/ariadna] queueing checkdeploy hook /srv/www/ariadna/releases/20150120133654/deploy/before_migrate.rb
[2015-01-20T13:37:00+00:00] INFO: Processing template[/srv/www/ariadna/shared/config/database.yml] action create (/var/lib/aws/opsworks/cache.stage2/cookbooks/deploy/definitions/opsworks_deploy.rb line 115)
[2015-01-20T13:37:00+00:00] INFO: deploy[/srv/www/ariadna] made pre-migration symlinks
[2015-01-20T13:37:00+00:00] INFO: deploy[/srv/www/ariadna] set user to deploy
[2015-01-20T13:37:00+00:00] INFO: deploy[/srv/www/ariadna] set group to www-data
[2015-01-20T13:37:00+00:00] INFO: deploy[/srv/www/ariadna] migrating deploy
================================================================================
Error executing action `deploy` on resource 'deploy[/srv/www/ariadna]'
================================================================================
Chef::Exceptions::Exec
----------------------
if [ -f Gemfile ]; then echo 'OpsWorks: Gemfile found - running migration with bundle exec' && /usr/local/bin/bundle exec /usr/local/bin/rake db:migrate; else echo 'OpsWorks: no Gemfile - running plain migrations' && /usr/local/bin/rake db:migrate; fi returned 1, expected 0
Cookbook Trace:
---------------
/var/lib/aws/opsworks/cache.stage2/cookbooks/opsworks_commons/libraries/monkey_patch_deploy_provider.rb:45:in `block in migrate'
/var/lib/aws/opsworks/cache.stage2/cookbooks/opsworks_commons/libraries/monkey_patch_deploy_provider.rb:39:in `migrate'
Resource Declaration:
---------------------
# In /var/lib/aws/opsworks/cache.stage2/cookbooks/deploy/definitions/opsworks_deploy.rb
65: deploy deploy[:deploy_to] do
66: provider Chef::Provider::Deploy.const_get(deploy[:chef_provider])
67: keep_releases deploy[:keep_releases]
68: repository deploy[:scm][:repository]
69: user deploy[:user]
70: group deploy[:group]
71: revision deploy[:scm][:revision]
72: migrate deploy[:migrate]
73: migration_command deploy[:migrate_command]
74: environment deploy[:environment].to_hash
75: purge_before_symlink(deploy[:purge_before_symlink]) unless deploy[:purge_before_symlink].nil?
76: create_dirs_before_symlink(deploy[:create_dirs_before_symlink])
77: symlink_before_migrate(deploy[:symlink_before_migrate])
78: symlinks(deploy[:symlinks]) unless deploy[:symlinks].nil?
79: action deploy[:action]
80:
81: if deploy[:application_type] == 'rails' && node[:opsworks][:instance][:layers].include?('rails-app')
82: restart_command "sleep #{deploy[:sleep_before_restart]} && #{node[:opsworks][:rails_stack][:restart_command]}"
83: end
84:
Compiled Resource:
------------------
# Declared in /var/lib/aws/opsworks/cache.stage2/cookbooks/deploy/definitions/opsworks_deploy.rb:65:in `block in from_file'
deploy("/srv/www/ariadna") do
params {:deploy_data=>{"deploy_to"=>"/srv/www/ariadna", "chef_provider"=>"Timestamped", "keep_releases"=>5, "current_path"=>"/srv/www/ariadna/current", "document_root"=>"public", "ignore_bundler_groups"=>["test", "development"], "absolute_document_root"=>"/srv/www/ariadna/current/public/", "rake"=>"/usr/local/bin/rake", "migrate"=>true, "migrate_command"=>"if [ -f Gemfile ]; then echo 'OpsWorks: Gemfile found - running migration with bundle exec' && /usr/local/bin/bundle exec /usr/local/bin/rake db:migrate; else echo 'OpsWorks: no Gemfile - running plain migrations' && /usr/local/bin/rake db:migrate; fi", "rails_env"=>"production", "action"=>"deploy", "user"=>"deploy", "group"=>"www-data", "shell"=>"/bin/bash", "home"=>"/home/deploy", "sleep_before_restart"=>0, "stack"=>{"needs_reload"=>true}, "enable_submodules"=>true, "shallow_clone"=>false, "delete_cached_copy"=>true, "purge_before_symlink"=>["log", "tmp/pids", "public/system"], "create_dirs_before_symlink"=>["tmp", "public", "config"], "symlink_before_migrate"=>{"config/database.yml"=>"config/database.yml", "config/memcached.yml"=>"config/memcached.yml"}, "symlinks"=>{"system"=>"public/system", "pids"=>"tmp/pids", "log"=>"log"}, "environment"=>{"RAILS_ENV"=>"production", "RUBYOPT"=>"", "RACK_ENV"=>"production", "HOME"=>"/home/deploy"}, "environment_variables"=>{}, "ssl_support"=>false, "auto_npm_install_on_deploy"=>true, "nodejs"=>{"restart_command"=>"monit restart node_web_app_ariadna", "stop_command"=>"monit stop node_web_app_ariadna", "port"=>80}, "application"=>"ariadna", "application_type"=>"rails", "auto_bundle_on_deploy"=>true, "deploying_user"=>"arn:aws:iam::673556511701:root", "domains"=>["ariadna"], "mounted_at"=>nil, "restart_command"=>nil, "ssl_certificate"=>nil, "ssl_certificate_key"=>nil, "ssl_certificate_ca"=>nil, "scm"=>{"scm_type"=>"git", "repository"=>"git#bitbucket.org:viktorpr7/ariadna.git", "revision"=>"master", "ssh_key"=>"...................", "user"=>nil, "password"=>nil}, "database"=>{"host"=>"172.31.23.102", "database"=>"ariadna_production", "port"=>3306, "username"=>"root", "password"=>"13m3i60f6r", "reconnect"=>true, "data_source_provider"=>"stack", "type"=>"mysql", "adapter"=>"mysql2"}, "memcached"=>{"host"=>nil, "port"=>11211}}, :app=>"ariadna", :name=>nil}
provider Chef::Provider::Deploy::Timestamped
action [:deploy]
updated true
updated_by_last_action true
retries 0
retry_delay 2
deploy_to "/srv/www/ariadna"
environment {"RAILS_ENV"=>"production", "RUBYOPT"=>"", "RACK_ENV"=>"production", "HOME"=>"/home/deploy", "LC_ALL"=>"C"}
repository_cache "cached-copy"
purge_before_symlink ["log", "tmp/pids", "public/system"]
create_dirs_before_symlink ["tmp", "public", "config"]
symlink_before_migrate {"config/database.yml"=>"config/database.yml", "config/memcached.yml"=>"config/memcached.yml"}
symlinks {"system"=>"public/system", "pids"=>"tmp/pids", "log"=>"log"}
revision "master"
migrate true
remote "origin"
enable_submodules true
scm_provider Chef::Provider::Git
keep_releases 5
enable_checkout true
checkout_branch "deploy"
cookbook_name "deploy"
recipe_name "rails"
repo "git#bitbucket.org:viktorpr7/ariadna.git"
user "deploy"
group "www-data"
migration_command "if [ -f Gemfile ]; then echo 'OpsWorks: Gemfile found - running migration with bundle exec' && /usr/local/bin/bundle exec /usr/local/bin/rake db:migrate; else echo 'OpsWorks: no Gemfile - running plain migrations' && /usr/local/bin/rake db:migrate; fi"
restart_command "sleep 0 && ../../shared/scripts/unicorn clean-restart"
before_migrate #<Proc:0x007ff79d1c63c0#/var/lib/aws/opsworks/cache.stage2/cookbooks/deploy/definitions/opsworks_deploy.rb:100>
shared_path "/srv/www/ariadna/shared"
destination "/srv/www/ariadna/shared/cached-copy"
current_path "/srv/www/ariadna/current"
end
[2015-01-20T13:37:01+00:00] INFO: Running queued delayed notifications before re-raising exception
[2015-01-20T13:37:01+00:00] ERROR: Running exception handlers
[2015-01-20T13:37:01+00:00] ERROR: Exception handlers complete
[2015-01-20T13:37:01+00:00] FATAL: Stacktrace dumped to /var/lib/aws/opsworks/cache.stage2/chef-stacktrace.out
[2015-01-20T13:37:01+00:00] ERROR: deploy[/srv/www/ariadna] (deploy::rails line 65) had an error: Chef::Exceptions::Exec: if [ -f Gemfile ]; then echo 'OpsWorks: Gemfile found - running migration with bundle exec' && /usr/local/bin/bundle exec /usr/local/bin/rake db:migrate; else echo 'OpsWorks: no Gemfile - running plain migrations' && /usr/local/bin/rake db:migrate; fi returned 1, expected 0
[2015-01-20T13:37:01+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Someone knows the origin of this error?
Chef::Exceptions::Exec
----------------------
if [ -f Gemfile ]; then echo 'OpsWorks: Gemfile found - running migration with bundle exec' && /usr/local/bin/bundle exec /usr/local/bin/rake db:migrate; else echo 'OpsWorks: no Gemfile - running plain migrations' && /usr/local/bin/rake db:migrate; fi returned 1, expected 0
The error is due to the migration command, so something goes wrong inside it.
I had this exact issue.
In the spirit of treating servers as cattle instead of pets, the best way to go forward is to kill that existing server, and spin a new instance from your layer. It would eliminate any factors outside your Chef Recipes (anything outside shouldn't really be your concern - it should be Amazon's!)
Works for me most of the times. If this doesn't work, then you are 100% sure it is something in your recipes.
Had a similar issue that was caused by environment variables containing certain characters ('\\'). These seem not to be correctly escaped when passed on to bundle exec by the run_command during deploy.
The migration command failed with the following error:
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Psych::SyntaxError: (<unknown>): found unknown escape character while parsing a quoted scalar at line 230 column 22
/home/deploy/.bundler/optisure_staging/ruby/2.3.0/gems/config-1.0.0/lib/config/sources/yaml_source.rb:16:in `load'
/home/deploy/.bundler/optisure_staging/ruby/2.3.0/gems/config-1.0.0/lib/config/options.rb:50:in `block in reload!'
/home/deploy/.bundler/optisure_staging/ruby/2.3.0/gems/config-1.0.0/lib/config/options.rb:49:in `each'
The pain in identifying this was to get opsworks/chef to log this information. Ended up editing the monkey_patch_deploy_provider.rb in the cookbooks cache on the machine to set the log level.

jekyll error / sh: command not found: jekyll

I installed jekyll and when i run this command
jekyll serve --watch
I get
sh: command not found: jekyll
This is what's inside my zshrc file
PATH=$PATH:$HOME/.rvm/bin
and ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.5.0]
I run OSX 10.9
I found some solutions that suggest to change the PATH but not working.
Not experienced with ruby.
Thanks
Edit:
gem environment
- RUBYGEMS VERSION: 2.0.3
- RUBY VERSION: 2.0.0 (2013-06-27 patchlevel 247) [x86_64-darwin12.5.0]
- INSTALLATION DIRECTORY: /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/gems/2.0.0
- RUBY EXECUTABLE: /usr/local/Cellar/ruby/2.0.0-p247/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/Cellar/ruby/2.0.0-p247/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-12
- GEM PATHS:
- /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/gems/2.0.0
- /Users/user1/.gem/ruby/2.0.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
Changed the path to
PATH=$PATH:$HOME/usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/gems/2.0.0
but still not working
So after #tamouse suggested to run brew doctor I got theses warnings and I managed to fix them and I think this was the main issue after upgrading to OSX 10.9.
After that I installed Ruby using
rvm install ruby-2.0.0-p247
and this fixed the issue.
Thanks every one
Try this PATH setting:
PATH=$PATH:/usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/gems/2.0.0
The directory containing jekyll is not under $HOME.