I am trying to contribute to a Github Page/Jekyll site and want to be able to visualise changes locally but when I run bundle exec jekyll serve but I get this output:
bundler: failed to load command: jekyll (/usr/local/lib/ruby/gems/3.0.0/bin/jekyll)
/usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/html.rb:10:in `require': cannot load such file -- rexml/parsers/baseparser (LoadError)
from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/html.rb:10:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/html.rb:10:in `require'
from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/html.rb:10:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/paragraph.rb:14:in `require'
from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/paragraph.rb:14:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:345:in `require'
from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:345:in `<class:Kramdown>'
from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:60:in `<module:Parser>'
from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:19:in `<module:Kramdown>'
from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:17:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.5/lib/jekyll/converters/smartypants.rb:3:in `require'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.5/lib/jekyll/converters/smartypants.rb:3:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.5/lib/jekyll.rb:13:in `require'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.5/lib/jekyll.rb:13:in `block in require_all'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.5/lib/jekyll.rb:12:in `each'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.5/lib/jekyll.rb:12:in `require_all'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.5/lib/jekyll.rb:194:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.5/exe/jekyll:8:in `require'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.5/exe/jekyll:8:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `load'
from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.5/lib/bundler/cli/exec.rb:63:in `load'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.5/lib/bundler/cli/exec.rb:63:in `kernel_load'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.5/lib/bundler/cli/exec.rb:28:in `run'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.5/lib/bundler/cli.rb:494:in `exec'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.5/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.5/lib/bundler/cli.rb:30:in `dispatch'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.5/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.5/lib/bundler/cli.rb:24:in `start'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.5/exe/bundle:49:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.5/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.5/exe/bundle:37:in `<top (required)>'
from /usr/local/opt/ruby/bin/bundle:23:in `load'
from /usr/local/opt/ruby/bin/bundle:23:in `<main>'
I did bundle update and this the result:
Using concurrent-ruby 1.1.8 (was 1.1.7)
Using multi_json 1.15.0
Using public_suffix 3.1.1
Using latex-decode 0.3.2
Using bundler 2.2.5
Using coffee-script-source 1.11.1
Using execjs 2.7.0
Using colorator 1.1.0
Using namae 1.0.2 (was 1.0.1)
Using unf_ext 0.0.7.7
Using http_parser.rb 0.6.0
Using faraday-net_http 1.0.1
Using multipart-post 2.1.1
Using ruby2_keywords 0.0.4
Using forwardable-extended 2.6.0
Using gemoji 3.0.1
Using rb-fsevent 0.10.4
Using kramdown 1.17.0
Using liquid 4.0.3
Using mercenary 0.3.6
Using rouge 3.13.0
Using safe_yaml 1.0.5
Using racc 1.5.2
Using jekyll-paginate 1.1.0
Using rubyzip 2.3.0
Using jekyll-swiss 1.0.0
Using unicode-display_width 1.7.0
Using i18n 0.9.5
Using coffee-script 2.4.1
Using citeproc 1.0.10
Using csl 1.5.2
Using unf 0.1.4
Using eventmachine 1.2.7
Using citeproc-ruby 1.1.13 (was 1.1.12)
Using activesupport 3.2.22.5
Using csl-styles 1.0.1.10
Using simpleidn 0.2.1 (was 0.1.1)
Using faraday 1.3.0 (was 1.0.1)
Using addressable 2.7.0
Using pathutil 0.16.2
Using jekyll-coffeescript 1.1.1
Using nokogiri 1.11.1 (x86_64-darwin) (was 1.10.10)
Using terminal-table 1.8.0
Using bibtex-ruby 4.4.7
Using em-websocket 0.5.2
Using dnsruby 1.61.5 (was 1.61.4)
Using html-pipeline 2.14.0
Using ffi 1.14.2 (was 1.13.1)
Using sawyer 0.8.2
Using ethon 0.12.0
Fetching ruby-enum 0.9.0 (was 0.8.0)
Using typhoeus 1.4.0
Using octokit 4.20.0 (was 4.18.0)
Using rb-inotify 0.10.1
Using github-pages-health-check 1.16.1
Using sass-listen 4.0.0
Using listen 3.4.1 (was 3.2.1)
Using jekyll-gist 1.5.0
Using sass 3.7.4
Using jekyll-watch 2.2.1
Using jekyll-sass-converter 1.5.2
Using jekyll 3.8.5
Using jekyll-avatar 0.7.0
Using jekyll-github-metadata 2.13.0
Using jekyll-mentions 1.5.1
Using jekyll-optional-front-matter 0.3.2
Using jekyll-readme-index 0.3.0
Using jekyll-redirect-from 0.15.0
Using jekyll-relative-links 0.6.1
Using jekyll-remote-theme 0.4.1
Using jekyll-seo-tag 2.6.1
Using jekyll-sitemap 1.4.0
Using jekyll-titles-from-headings 0.5.3
Using jemoji 0.11.1
Using jekyll-scholar 5.16.0
Using jekyll-feed 0.13.0
Using jekyll-theme-cayman 0.1.1
Using jekyll-theme-dinky 0.1.1
Using jekyll-theme-hacker 0.1.1
Using jekyll-theme-leap-day 0.1.1
Using jekyll-theme-merlot 0.1.1
Using jekyll-default-layout 0.1.4
Using jekyll-theme-minimal 0.1.1
Using jekyll-theme-midnight 0.1.1
Using jekyll-theme-primer 0.5.4
Using jekyll-theme-slate 0.1.1
Using jekyll-theme-tactile 0.1.1
Using jekyll-theme-modernist 0.1.1
Using jekyll-theme-time-machine 0.1.1
Using minima 2.5.1
Using jekyll-theme-architect 0.1.1
Installing ruby-enum 0.9.0 (was 0.8.0)
Using commonmarker 0.17.13
Using jekyll-commonmark 1.3.1
Using jekyll-commonmark-ghpages 0.1.6
Using github-pages 204
Bundle updated!
Also, this is what the gemfile looks like:
source "https://rubygems.org"
gem 'jekyll-scholar', group: :jekyll_plugins
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
gem "github-pages", "~> 204", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.0" if Gem.win_platform?
Why doesn'it work?
I am fairly new to ruby and jekyll/github pages but I created another Github Page's website and this commands without a problem...
I had the same problem and I found a workaround here at https://github.com/jekyll/jekyll/issues/8523
Add gem "webrick" to the Gemfile in your website. Than run bundle install
At this point you can run bundle exec jekyll serve
For me it works!
I also get this error. The solution is in the documentation itself.
If you are using Ruby version 3.0.0 or higher, step 5 may fail(bundle exec jekyll serve). You may fix it by adding webrick to your dependencies: bundle add webrick
Or add gem "webrick" into the Gemfile, then bundle install.
Here's how I solved it thanks to #choas' comment:
Updated github-pages, jekyll and jekyll-feed gems by running gem install github-pages, gem install jekyll and gem install jekyll-feed. I had to do this step as a simple bundle update wasn't installing the latest version.
Modify those gems in the Gemfile to the latest version.
Run bundle update
Finally run bundle exec jekyll serve
I am not sure that all those steps aren't redundant as I am not very familiar with Ruby/Github Pages/Jekyll but it did work.
I see that you're using github-pages:204 and jekyll:3.8.5.
I made my project with the same dependencies work with:
bundle update github-pages
bundle add webrick
Install webrick and jekyll-mentions: open terminal and type gem install webrick then gem install jekyll-mentions.
Open your gem file and add gem "jekyll-mentions" and gem "webrick" in the pulgins:
group :jekyll_plugins do
gem "jekyll-mentions", "1.6.0"
gem "webrick"
end
Navigate back to terminal, and execute bundle install.
You are good to go, I think. This process worked for me!
Simple remove the specific version of jekyll in gemfile, as that specificity causes dependency issues with the kramdown package.
gem "jekyll", "~> 3.2.1"
Remove the specific version of jekyll, like so:
gem "jekyll"
Add webrick gem to gemfile
gem "webrick"
Run bundler again.
bundler
Finally, serve
bundle exec jekyll serve --livereload
Thank you yours most closely got mine working. I apparently also needed a bunch of other plugins so my working Gemfile jekyll_plugins look like so:
group :jekyll_plugins do
gem "jekyll-feed"
gem "jekyll-mentions"
gem "webrick"
gem "jekyll-redirect-from"
gem "jekyll-sitemap"
gem "jekyll-avatar"
gem "jemoji"
end
then bundle install; bundle exec jekyll serve
Related
My system is macOS m1 chip. I'm using ruby to bundle install from gemfile, but it seems like the llhttp-ffi gem has conflict, I'm not really sure about the problem. So below is the output when I tried bundle install. I've tried to search about Failed to build gem native extension or just gem install ffi, both have not worked.
$ bundle install
Fetching gem metadata from https://rubygems.org/........
Resolving dependencies...
Using rake 13.0.6
Using public_suffix 4.0.6
Using dry-inflector 0.2.1
Using ast 2.4.2
Using ice_nine 0.11.2
Using ffi 1.15.4
Using thor 1.1.0
Using path_expander 1.1.0
Using sexp_processor 4.15.3
Using hashdiff 1.0.1
Using http-form_data 2.3.0
Using kwalify 0.7.2
Using rb-fsevent 0.11.0
Using method_source 1.0.0
Using minitest 5.14.4
Using nio4r 2.5.8
Using parallel 1.21.0
Using rack 2.2.3
Using rainbow 3.0.0
Using regexp_parser 2.1.1
Using ruby-progressbar 1.11.0
Using unicode-display_width 2.1.0
Using sequel 5.50.0
Using simplecov-html 0.12.3
Using simplecov_json_formatter 0.1.3
Using temple 0.8.2
Using tilt 2.0.10
Using bundler 2.2.22
Using vcr 6.0.0
Using addressable 2.8.0
Using ffi-compiler 1.0.1
Using figaro 1.2.0
Using ruby_parser 3.17.0
Using rb-inotify 0.10.1
Using minitest-rg 5.2.0
Using parser 3.0.2.0
Using puma 5.5.2
Using roda 3.49.0
Using slim 4.1.0
Using coderay 1.1.3
Using concurrent-ruby 1.1.9
Using rexml 3.2.5
Using docile 1.4.0
Using unf_ext 0.0.8
Fetching sqlite3 1.4.2
Using crack 0.4.5
Using unf 0.1.4
Using dry-core 0.7.1
Using flog 4.6.4
Fetching llhttp-ffi 0.4.0
Using listen 3.7.0
Using pry 0.14.1
Using reek 6.0.6
Using rubocop-ast 1.12.0
Using simplecov 0.21.2
Using domain_name 0.5.20190701
Using dry-configurable 0.13.0
Using dry-logic 1.2.0
Using rerun 0.13.1
Using rubocop 1.22.1
Using webmock 3.14.0
Using dry-container 0.9.0
Using http-cookie 1.0.4
Using dry-types 1.5.1
Using dry-struct 1.4.0
Installing llhttp-ffi 0.4.0 with native extensions
Installing sqlite3 1.4.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /opt/homebrew/lib/ruby/gems/3.0.0/gems/llhttp-ffi-0.4.0/ext
/opt/homebrew/opt/ruby/bin/ruby -I/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0 -rrubygems /opt/homebrew/lib/ruby/gems/3.0.0/gems/rake-13.0.6/exe/rake
RUBYARCHDIR\=/opt/homebrew/lib/ruby/gems/3.0.0/extensions/arm64-darwin-20/3.0.0/llhttp-ffi-0.4.0
RUBYLIBDIR\=/opt/homebrew/lib/ruby/gems/3.0.0/extensions/arm64-darwin-20/3.0.0/llhttp-ffi-0.4.0
rake aborted!
LoadError: dlopen(/opt/homebrew/lib/ruby/gems/3.0.0/gems/ffi-1.15.4/lib/ffi_c.bundle, 9): no suitable image found. Did find:
/opt/homebrew/lib/ruby/gems/3.0.0/gems/ffi-1.15.4/lib/ffi_c.bundle: mach-o, but wrong architecture
/opt/homebrew/lib/ruby/gems/3.0.0/gems/ffi-1.15.4/lib/ffi_c.bundle: mach-o, but wrong architecture - /opt/homebrew/lib/ruby/gems/3.0.0/gems/ffi-1.15.4/lib/ffi_c.bundle
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/ffi-1.15.4/lib/ffi.rb:5:in `rescue in <top (required)>'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/ffi-1.15.4/lib/ffi.rb:2:in `<top (required)>'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/ffi-compiler-1.0.1/lib/ffi-compiler/compile_task.rb:4:in `<top (required)>'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:160:in `require'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:160:in `rescue in require'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:149:in `require'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/llhttp-ffi-0.4.0/ext/Rakefile:3:in `<top (required)>'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<main>'
Caused by:
LoadError: cannot load such file -- 3.0/ffi_c
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/ffi-1.15.4/lib/ffi.rb:3:in `<top (required)>'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/ffi-compiler-1.0.1/lib/ffi-compiler/compile_task.rb:4:in `<top (required)>'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:160:in `require'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:160:in `rescue in require'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:149:in `require'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/llhttp-ffi-0.4.0/ext/Rakefile:3:in `<top (required)>'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<main>'
Caused by:
LoadError: cannot load such file -- ffi-compiler/compile_task
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/llhttp-ffi-0.4.0/ext/Rakefile:3:in `<top (required)>'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<main>'
(See full trace by running task with --trace)
rake failed, exit code 1
Gem files will remain installed in /opt/homebrew/lib/ruby/gems/3.0.0/gems/llhttp-ffi-0.4.0 for inspection.
Results logged to /opt/homebrew/lib/ruby/gems/3.0.0/extensions/arm64-darwin-20/3.0.0/llhttp-ffi-0.4.0/gem_make.out
An error occurred while installing llhttp-ffi (0.4.0), and Bundler cannot continue.
Make sure that `gem install llhttp-ffi -v '0.4.0' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
http was resolved to 5.0.4, which depends on
llhttp-ffi
I was seeing the same problem while updating Ruby from 2.7.5 to 2.7.6. Big Sur 11.6.1, Intel i7, fwiw.
After many confusing errors and failed solutions, I deleted my entire bundle/vendor directory and bundled anew. This got me a clean bundle install.
I'm not sure what the conflict was, but a clean slate fixed it.
The solution to this issue given on rubyinstaller does not work for me
https://github.com/oneclick/rubyinstaller2/issues/96
gem uninstall eventmachine
gem install eventmachine --platform ruby
Any thoughts?
PS D:\wiecejwolnosci> jekyll new site2 .
Running bundle install in D:/wiecejwolnosci/site2...
Bundler: Fetching gem metadata from https://rubygems.org/..........
Bundler: Resolving dependencies...
Bundler: Using public_suffix 4.0.6
Bundler: Using addressable 2.7.0
Bundler: Using bundler 2.2.12
Bundler: Using colorator 1.1.0
Bundler: Using concurrent-ruby 1.1.8
Bundler: Using eventmachine 1.2.7 (x64-mingw32)
Bundler: Using http_parser.rb 0.6.0
Bundler: Using em-websocket 0.5.2
Bundler: Using ffi 1.14.2 (x64-mingw32)
Bundler: Using forwardable-extended 2.6.0
Bundler: Using jekyll-sass-converter 2.1.0
Bundler: Using rb-fsevent 0.10.4
Bundler: Using rb-inotify 0.10.1
Bundler: Using listen 3.4.1
Bundler: Using jekyll-watch 2.2.1
Bundler: Using rexml 3.2.4
Bundler: Using kramdown 2.3.0
Bundler: Using kramdown-parser-gfm 1.1.0
Bundler: Using liquid 4.0.3
Bundler: Using mercenary 0.4.0
Bundler: Using pathutil 0.16.2
Bundler: Using rouge 3.26.0
Bundler: Using safe_yaml 1.0.5
Bundler: Using unicode-display_width 1.7.0
Bundler: Using terminal-table 2.0.0
Bundler: Using jekyll 4.2.0
Bundler: Using jekyll-feed 0.15.1
Bundler: Using minima 2.5.1
Bundler: Using thread_safe 0.3.6
Bundler: Using tzinfo 1.2.9
Bundler: Using tzinfo-data 1.2021.1
Bundler: Using wdm 0.1.1
Bundler: Bundle complete! 6 Gemfile dependencies, 35 gems now installed.
Bundler: Use `bundle info [gemname]` to see where a bundled gem is installed.
New jekyll site installed in D:/wiecejwolnosci/site2.
PS D:\wiecejwolnosci> cd .\site2\
PS D:\wiecejwolnosci\site2> ls
Directory: D:\wiecejwolnosci\site2
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 05/03/2021 14:37 _posts
-a---- 05/03/2021 14:37 56 .gitignore
-a---- 05/03/2021 14:37 419 404.html
-a---- 05/03/2021 14:37 539 about.markdown
-a---- 05/03/2021 14:37 1155 Gemfile
-a---- 05/03/2021 14:38 2038 Gemfile.lock
-a---- 05/03/2021 14:37 175 index.markdown
-a---- 05/03/2021 14:37 2080 _config.yml
PS D:\wiecejwolnosci\site2> bundler install
Using public_suffix 4.0.6
Using addressable 2.7.0
Using bundler 2.2.12
Using colorator 1.1.0
Using concurrent-ruby 1.1.8
Using eventmachine 1.2.7 (x64-mingw32)
Using http_parser.rb 0.6.0
Using em-websocket 0.5.2
Using ffi 1.14.2 (x64-mingw32)
Using i18n 1.8.9
Using sassc 2.4.0 (x64-mingw32)
Using jekyll-sass-converter 2.1.0
Using rb-fsevent 0.10.4
Using rb-inotify 0.10.1
Using listen 3.4.1
Using jekyll-watch 2.2.1
Using rexml 3.2.4
Using kramdown 2.3.0
Using kramdown-parser-gfm 1.1.0
Using liquid 4.0.3
Using mercenary 0.4.0
Using pathutil 0.16.2
Using rouge 3.26.0
Using safe_yaml 1.0.5
Using unicode-display_width 1.7.0
Using terminal-table 2.0.0
Using jekyll 4.2.0
Using jekyll-feed 0.15.1
Using jekyll-seo-tag 2.7.1
Using minima 2.5.1
Using thread_safe 0.3.6
Using tzinfo 1.2.9
Using tzinfo-data 1.2021.1
Using wdm 0.1.1
Bundle complete! 6 Gemfile dependencies, 35 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
PS D:\wiecejwolnosci\site2> bundler exec jekyll serve --livereload
Configuration file: D:/wiecejwolnosci/site2/_config.yml
Source: D:/wiecejwolnosci/site2
Destination: D:/wiecejwolnosci/site2/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
done in 1.494 seconds.
Auto-regeneration: enabled for 'D:/wiecejwolnosci/site2'
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
------------------------------------------------
Jekyll 4.2.0 Please append `--trace` to the `serve` command
for any additional information or backtrace.
------------------------------------------------
Traceback (most recent call last):
22: from C:/Ruby27-x64/bin/jekyll:23:in `<main>'
21: from C:/Ruby27-x64/bin/jekyll:23:in `load'
20: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/exe/jekyll:15:in `<top (required)>'
19: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
18: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
17: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
16: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
15: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
14: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
13: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
12: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `each'
11: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
10: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:98:in `process'
9: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:143:in `register_reload_hooks'
8: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:143:in `require_relative'
7: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve/live_reload_reactor.rb:3:in `<top (required)>'
6: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve/live_reload_reactor.rb:3:in `require'
5: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/em-websocket-0.5.2/lib/em-websocket.rb:3:in `<top (required)>'
4: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/em-websocket-0.5.2/lib/em-websocket.rb:3:in `require'
3: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7-x64-mingw32/lib/eventmachine.rb:8:in `<top (required)>'
2: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7-x64-mingw32/lib/eventmachine.rb:8:in `require'
1: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7-x64-mingw32/lib/rubyeventmachine.rb:2:in `<top (required)>'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7-x64-mingw32/lib/rubyeventmachine.rb:2:in `require': cannot load such file -- 2.7/rubyeventmachine (LoadError)
EventMachine is severely undermaintained. I had a lot of issues with it while writing CI jobs. The best way to deal with it is to use a Git version. In your Gemfile you will need to add:
gem 'eventmachine', github: 'eventmachine/eventmachine'
Then you will need to bundle install.
For those who just want to make Jekyll live reload: Use a browser extension instead.
Example:
Install blaise-io/live-reload. (Chrome / Firefox / Edge)
Serve your site (jekyll serve/bundler exec jekyll serve) and open in your browser.
Click the extension's button (in browser's bar), click “Create a new reload rule…”, then a small window would appear.
In “Source file URLs”, enter your Jekyll generated files' permalinks (eg. http://localhost:4000/assets/css/*.css).
(In other words, .html & .css rather than .md & .scss, http:// rather than file:///. These files maps to your _site/ folder.)
Scroll down, “Save reload rule”. Have fun Jekylling.
(Warn: I am new to ruby, so below may be wrong.)
In fact, this is not a Jekyll issue. Search for Ruby if you want.
You can check this in Interactive Ruby.
Open a terminal, enter irb, write require 'eventmachine', and a similar issue would happen.
PS C:\Users\…❯ irb
irb(main):001:0> require 'eventmachine'
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
……
(If you get stuck in Interactive Ruby, Ctrl+C, enter exit/quit.)
Jeyll's --livereload (live_reload_reactor.rb or sth.) (indirectly) uses EventMachine, which goes wrong.
EventMachine is implemented in 2 ways:
C as an extension: Default but not working. Sorry I don't know how to fix.
(Reinstall may work, try if you haven't. Good luck :-)
Ruby: Not default. Some works, some (including me) don't.
You can have a try by adding require 'em/pure_ruby' as the first line of where-you-install-ruby/Ruby○○-x○○/lib/ruby/gems/○.○.○/gems/eventmachine-○.○.○-x○○-mingw32/lib/eventmachine.rb. (“○” are numbers depends on versions)
If you uses Ruby 3.x, you may met another issue (as the comments there saying): Ruby 3.x removes SortedSet (pure_ruby.rb writes #timers = SortedSet.new # []) and recommends sorted_set for an alternative, though Ruby 3.x autoload :SortedSet, "#{__dir__}/set/sorted_set". I install and require 'sorted_set', but other issues appear.
Conclusion: Jeyllers' quick solution is using a browser extension.
This is my gemfile:
source 'https://rubygems.org'
gem 'watir', '~> 6.0', '>= 6.0.0'
gem 'watir-scroll'
gem 'cucumber', '~> 2.4', '>= 2.0.0'
gem 'rspec'
gem 'page-object'
gem 'require_all'
gem 'nokogiri', '~> 1.6.8', '>= 1.6.8.1'
gem 'webdriver-user-agent', '~> 7.1'
gem 'headless'
gem 'bundle', '~> 0.0.1'
gem 'appium_lib'
gem 'rake'
gem 'test-unit'
This is the output of bundle update
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 12.1.0
Using awesome_print 1.8.0
Using json 2.1.0 (was 1.8.6)
Using mini_portile2 2.1.0
Using ffi 1.9.18 (x86-mingw32)
Using rubyzip 1.2.1
Using tomlrb 1.2.5
Using builder 3.2.3
Using bundler 1.15.4
Using gherkin 4.1.3
Using cucumber-wire 0.0.1
Using diff-lcs 1.3
Using multi_json 1.12.2
Using multi_test 0.1.2
Using i18n 0.8.6
Using yml_reader 0.7
Using facets 3.1.0
Using headless 2.3.1
Using power_assert 1.1.0
Using psych 2.2.4
Using require_all 1.4.0
Using rspec-support 3.6.0
Using nokogiri 1.6.8.1 (x86-mingw32)
Using childprocess 0.8.0
Using bundle 0.0.1
Using cucumber-core 1.5.0
Using faker 1.8.4
Using test-unit 3.2.6
Using rspec-core 3.6.0
Using rspec-expectations 3.6.0
Using rspec-mocks 3.6.0
Using selenium-webdriver 3.6.0 (was 2.53.4)
Using cucumber 2.99.0
Using data_magic 1.2
Using rspec 3.6.0
Using appium_lib 9.6.1 (was 9.0.0)
Using watir 6.8.4 (was 5.0.0)
Using webdriver-user-agent 7.4
Using page_navigation 0.10
Using watir-scroll 0.3.0 (was 0.2.0)
Using page-object 2.2.4 (was 1.2.2)
Bundle updated!
This is the output from Rubymine when executing my gherkin scenario:
D:\<redacted>\Ruby22\bin\ruby.exe -EUTF-8 -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) D:\<redacted>\Ruby22\bin/cucumber D:/dev/features/feature_files/hbf/category.feature --format Teamcity::Cucumber::Formatter --expand --name "^select resident\, select from dropdown\, verify most popular is displayed$" --color -r features
Testing started at 8:34 AM ...
undefined method `browser_name' for :chrome:Symbol (NoMethodError)
D:/<redacted>/Ruby22/lib/ruby/gems/2.2.0/gems/watir-6.8.4/lib/watir/capabilities.rb:12:in `initialize'
D:/<redacted>/Ruby22/lib/ruby/gems/2.2.0/gems/watir-6.8.4/lib/watir/browser.rb:47:in `new'
D:/<redacted>/Ruby22/lib/ruby/gems/2.2.0/gems/watir-6.8.4/lib/watir/browser.rb:47:in `initialize'
D:/dev/features/support/hooks.rb:97:in `new'
D:/dev/features/support/hooks.rb:97:in `<top (required)>'
D:/<redacted>/Ruby22/lib/ruby/gems/2.2.0/gems/cucumber-2.99.0/lib/cucumber/rb_support/rb_language.rb:96:in `load'
D:/<redacted>/Ruby22/lib/ruby/gems/2.2.0/gems/cucumber-2.99.0/lib/cucumber/rb_support/rb_language.rb:96:in `load_code_file'
D:/<redacted>/Ruby22/lib/ruby/gems/2.2.0/gems/cucumber-2.99.0/lib/cucumber/runtime/support_code.rb:142:in `load_file'
D:/<redacted>/Ruby22/lib/ruby/gems/2.2.0/gems/cucumber-2.99.0/lib/cucumber/runtime/support_code.rb:84:in `block in load_files!'
D:/<redacted>/Ruby22/lib/ruby/gems/2.2.0/gems/cucumber-2.99.0/lib/cucumber/runtime/support_code.rb:83:in `each'
D:/<redacted>/Ruby22/lib/ruby/gems/2.2.0/gems/cucumber-2.99.0/lib/cucumber/runtime/support_code.rb:83:in `load_files!'
D:/<redacted>/Ruby22/lib/ruby/gems/2.2.0/gems/cucumber-2.99.0/lib/cucumber/runtime.rb:253:in `load_step_definitions'
D:/<redacted>/Ruby22/lib/ruby/gems/2.2.0/gems/cucumber-2.99.0/lib/cucumber/runtime.rb:61:in `run!'
D:/<redacted>/Ruby22/lib/ruby/gems/2.2.0/gems/cucumber-2.99.0/lib/cucumber/cli/main.rb:32:in `execute!'
D:/<redacted>/Ruby22/lib/ruby/gems/2.2.0/gems/cucumber-2.99.0/bin/cucumber:8:in `<top (required)>'
D:/<redacted>/Ruby22/bin/cucumber:23:in `load'
D:/<redacted>/Ruby22/bin/cucumber:23:in `<top (required)>'
-e:1:in `load'
-e:1:in `<main>'
2017-09-29 08:34:39 WARN Selenium [DEPRECATION] :timeout= is deprecated. Use #read_timeout= and #open_timeout= instead.
Process finished with exit code 2
Just to recap, my scenario works with no errors with Watir5 but the above errors are returned when watir6.0 is installed. I'm using Rubymine 8.0.3
Please let me know if more information is required.
Please provide assistance to resolve this issue. Thanks a bunch
I believe the following is executed when running the scenario:
client = Selenium::WebDriver::Remote::Http::Default.new
client.timeout = 360
client.proxy = Selenium::WebDriver::Proxy.new(:http => "<redacted>")
browser = Watir::Browser.new(:remote, :url => "http://localhost:4444/wd/hub", :desired_capabilities => "#{ENV['BROWSER']}".to_sym, :http_client => client)
browser.driver.manage.window.maximize
This exception is a bug in the the new Watir::Capabilities - see Issue 661.
Aside from waiting for a bug fix to be released, in the short-term, you can use a Remote::Capabilities class instead of a Symbol. In other words, switch:
browser = Watir::Browser.new(:remote, desired_capabilities: :chrome)
to
caps = Selenium::WebDriver::Remote::Capabilities.chrome
browser = Watir::Browser.new(:remote, desired_capabilities: caps)
I have the following script
PUPPET_VERSION=3.7.4
ruby='1.8.7-p374'
rvm use $ruby#$$ --create
gem install bundler
bundle install --gemfile=.gemfile
This has worked for several months but sadly now it has decided to stop working.
After this script rake is called to run some rspec tasks
On the centos 6.6 bamboo test runner the process fails.
On the centos 6.4 development machine it still works
On my development machine this script (+rake tasks ) works like so
Fetching gem metadata from http://rubygems.org/.........
Fetching version metadata from http://rubygems.org/..
Installing rake 10.4.2
Installing CFPropertyList 2.2.8
Installing builder 3.2.2
Installing diff-lcs 1.2.5
Installing facter 2.4.1
Installing json_pure 1.8.2
Installing hiera 1.3.4
Installing metaclass 0.0.4
Installing mocha 1.1.0
Installing puppet 3.7.4
Installing puppet-lint 1.1.0
Installing puppet-syntax 1.4.1
Installing rspec-core 2.99.2
Installing rspec-expectations 2.99.2
Installing rspec-mocks 2.99.3
Installing rspec 2.99.0
Installing rspec-puppet 2.0.0
Installing puppetlabs_spec_helper 0.8.2
Installing rspec_junit_formatter 0.2.0
Using bundler 1.9.4
Bundle complete! 3 Gemfile dependencies, 20 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
manifests found
~/gitf/puppetmaster_np/local_modules/iop_4store/spec/fixtures/modules ~/gitf/puppetmaster_np/local_modules/iop_4store
~/gitf/puppetmaster_np/local_modules/iop_4store
/home/jan/.rvm/rubies/ruby-1.9.3-p484/bin/ruby -S rspec ./spec/classes/iop_4store_spec.rb --no-drb -r rspec_junit_formatter --format RspecJunitFormatter -o junit.xml --deprecation-out /dev/null
WARN: Unresolved specs during Gem::Specification.reset:
rake (>= 0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Removing gemset 16612......
However on the bamboo agent node it does this
The source :rubygems is deprecated because HTTP requests are insecure.
Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
Using rake 10.4.2
Using CFPropertyList 2.2.8
Using builder 3.2.2
Using diff-lcs 1.2.5
Using facter 2.4.3
Using json_pure 1.8.2
Using hiera 2.0.0
Using metaclass 0.0.4
Using mocha 1.1.0
Using puppet 4.0.0
Using puppet-lint 1.1.0
Using puppet-syntax 2.0.0
Using rspec-support 3.2.2
Using rspec-core 3.2.3
Using rspec-expectations 3.2.1
Using rspec-mocks 3.2.1
Using rspec 3.2.0
Using rspec-puppet 2.0.1
Using puppetlabs_spec_helper 0.10.2
Using rspec_junit_formatter 0.2.0
Using bundler 1.9.4
Bundle complete! 3 Gemfile dependencies, 21 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
manifests found
~/bamboo-agent-home/xml-data/build-dir/PUP-RCTAP-JOB1/local_modules/iop_4store/spec/fixtures/modules ~/bamboo-agent-home/xml-data/build-dir/PUP-RCTAP-JOB1/local_modules/iop_4store
~/bamboo-agent-home/xml-data/build-dir/PUP-RCTAP-JOB1/local_modules/iop_4store
/usr/local/rvm/rubies/ruby-1.9.3-p484/bin/ruby -I/usr/local/rvm/gems/ruby-1.9.3-p484/gems/rspec-support-3.2.2/lib:/usr/local/rvm/gems/ruby-1.9.3-p484/gems/rspec-core-3.2.3/lib /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rspec-core-3.2.3/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb --no-drb -r rspec_junit_formatter --format RspecJunitFormatter -o junit.xml --deprecation-out /dev/null
WARN: Unresolved specs during Gem::Specification.reset:
rake (>= 0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/puppetlabs_spec_helper-0.10.2/lib/puppetlabs_spec_helper/module_spec_helper.rb:23:in `block in <top (required)>': undefined method `environmentpath=' for #<RSpec::Core::Configuration:0x000000025a4068> (NoMethodError)
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rspec-core-3.2.3/lib/rspec/core.rb:101:in `configure'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/puppetlabs_spec_helper-0.10.2/lib/puppetlabs_spec_helper/module_spec_helper.rb:22:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:135:in `require'
from /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:144:in `require'
from /home/bamboo/bamboo-agent-home/xml-data/build-dir/PUP-RCTAP-JOB1/local_modules/iop_4store/spec/spec_helper.rb:2:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/bamboo/bamboo-agent-home/xml-data/build-dir/PUP-RCTAP-JOB1/local_modules/iop_4store/spec/classes/iop_4store_spec.rb:1:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1226:in `load'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1226:in `block in load_spec_files'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1224:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1224:in `load_spec_files'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:97:in `setup'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:85:in `run'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:70:in `run'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:38:in `invoke'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rspec-core-3.2.3/exe/rspec:4:in `<main>'
/usr/local/rvm/rubies/ruby-1.9.3-p484/bin/ruby -I/usr/local/rvm/gems/ruby-1.9.3-p484/gems/rspec-support-3.2.2/lib:/usr/local/rvm/gems/ruby-1.9.3-p484/gems/rspec-core-3.2.3/lib /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rspec-core-3.2.3/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb --no-drb -r rspec_junit_formatter --format RspecJunitFormatter -o junit.xml --deprecation-out /dev/null failed
/usr/local/rvm/gems/ruby-1.9.3-p484#27314 did not previously exist. Ignoring.
The tests fail and I'm sure that having a wildly different version of puppet (and other gems) is not helping. Also, our systems aren't running puppet 4
Here is the gemfile that is being used
source :rubygems
puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>=
2.7']
gem 'puppet', puppetversion
gem 'puppetlabs_spec_helper', '>= 0.1.0'
gem 'rspec_junit_formatter'
So my problem is that the scripts shown previously loaded the correct gems into rvm and executed the tests "as if" puppet 3.7.0. Now they try and load puppet 4 and the tests fail.
Thanks
Here's what I did to "make it work" Not entirely sure why this fixed it
First, alter the gemfile to copy most of the versions of the gem dependencies from the other server where it still works
source 'https://rubygems.org'
puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>=
2.7', '< 4.0']
gem 'diff-lcs', '1.2.5'
gem 'facter'
gem 'hiera', '1.3.4'
gem 'json_pure', '1.8.2'
gem 'metaclass', '0.0.4'
gem 'mocha', '1.1.0'
gem 'puppet', puppetversion
gem 'puppet-lint', '1.1.0'
gem 'puppet-syntax', '1.4.1'
gem 'puppetlabs_spec_helper', '0.8.2'
gem 'rake'
gem 'rspec', '2.99.0'
gem 'rspec-core', '2.99.2'
gem 'rspec-expectations', '2.99.2'
gem 'rspec-mocks', '2.99.3'
gem 'rspec-puppet', '2.0.0'
gem 'rspec_junit_formatter', '0.2.0'
Next, add a couple of "bundle update" and a "bundlee clean --force" to the script.
PUPPET_VERSION=3.7.4
ruby='1.9.3-p484'
rvm use $ruby#$$ --create
gem install bundler
ln -s .gemfile Gemfile
bundle clean --force
bundle update rspec
bundle install --gemfile=.gemfile
bundle update rspec
(the eagle eyed will note that I'm running a different ruby too)
I'm currently trying to install Webistrano on a freshly installed debian squeeze 64bits, but I'm facing some issues that I can't manage to solve.
Note: The machine is created under Xen environment, I don't think this affect the procedure however it seemed important to mention it.
Procedure:
Informations:
Ruby version: ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
Rails version: `Rails 2.3.11
Path modifier with: /usr/lib/ruby/1.8:/var/lib/gems/1.8/bin
Rails env: development
Databases have been created
Databases setups for webistrano are, I believe correct (user/pass/path_to_sock_file)
So, here is what I did:
I first installed the 'basics' packages for such installation:
# apt-get install build-essential ruby rubygems libmysql-ruby libmysqlclient-dev libdbd-mysql-ruby mysql-server unzip rake
Then I have been downloading and extracting the project into /usr/src. After copying and configuring the files for email/databses setups (as suggested by https://github.com/peritor/webistrano), I continued by installing all the gems needed for the project:
bundle install
at this point, the command is stuck and isn't doing anything for an hour.
I know it can happen if the Gemfile is complicate, but it doesn't seem to be the case for me. (see the Gemfile following)
# cat Gemfile
source "http://rubygems.org"
gem 'bundler', "~>1.0.10"
gem "rails", "2.3.11"
gem "mysql"
gem "erubis"
gem "rake"
gem "syntax", "1.0.0"
gem "capistrano", "2.6.0"
gem "open4", "0.9.3"
gem "exception_notification", "2.3.3.0"
group :test do
gem "mocha", "0.9.8"
end
So deciding to go ahead I installed the gems by hands, which once finished gives:
# gem list *gems of Gemfile*
bundler (1.0.10)
rails (2.3.11)
mysql (2.8.1)
erubis (2.7.0)
rake (0.9.2.2)
syntax (1.0.0)
capistrano (2.6.0)
open4 (0.9.3)
exception_notification (2.3.3.0)
mocha (0.9.8)
So I believe everything should be working without having to run: bundle install
This is why I finally tried to create the database's structure with rake:
# rake db:migrate --trace
(in /usr/src/peritor-webistrano-a98ba6b)
rake aborted!
Bundler couldn't find some gems.Did you run `bundle install`?
/usr/src/peritor-webistrano-a98ba6b/config/../config/preinitializer.rb:18
/usr/src/peritor-webistrano-a98ba6b/config/boot.rb:28:in `load'
/usr/src/peritor-webistrano-a98ba6b/config/boot.rb:28:in `preinitialize'
/usr/src/peritor-webistrano-a98ba6b/config/boot.rb:10:in `boot!'
/usr/src/peritor-webistrano-a98ba6b/config/boot.rb:123
/usr/src/peritor-webistrano-a98ba6b/Rakefile:4:in `require'
/usr/src/peritor-webistrano-a98ba6b/Rakefile:4
/usr/lib/ruby/1.8/rake.rb:2383:in `load'
/usr/lib/ruby/1.8/rake.rb:2383:in `raw_load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2017:in `load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2016:in `load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2000:in `run'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:28
According to rake error message, apparently some gems aren't properly installed, which seems weird to be, but I guess he can't find it.
So I double check with bundle tool:
# bundle check
Your Gemfile's dependencies could not be satisfied
Install missing gems with `bundle install`
# bundle show
Could not find gem 'mocha (= 0.9.8, runtime)' in any of the gem sources listed in your Gemfile.
And I'm stuck here, I just don't know how to continue.
I google around about mocha or gemfile issue, but haven't found much relevant.
I hope everything is clear and easy to understand as this is my first post.
Thanks for any reply/hints, also if I manage to evolve I'll try keeping you up to date!
Check these instructions:
http://www.gogolek.co.uk/blog/2012/10/web-application-deployment-webistrano-capistrano/
Additionally I had problems with mysql gem installation on my clean debian 6 64-bit, so I had to run
$ apt-get install libmysqlclient-dev ruby-dev
I ended up with following gems installed
Using rake (0.8.7)
Using activesupport (2.3.11)
Using rack (1.1.6)
Using actionpack (2.3.11)
Using actionmailer (2.3.11)
Using activerecord (2.3.11)
Using activeresource (2.3.11)
Using bundler (1.0.10)
Using highline (1.6.20)
Using net-ssh (2.7.0)
Using net-scp (1.1.2)
Using net-sftp (2.1.2)
Using net-ssh-gateway (1.2.0)
Using capistrano (2.6.0)
Using erubis (2.7.0)
Using exception_notification (2.3.3.0)
Using mocha (0.9.8)
Installing mysql (2.9.1) with native extensions
Installing open4 (0.9.3)
Installing rails (2.3.11)
Installing syntax (1.0.0)
Your bundle is updated! Use `bundle show [gemname]` to see where a bundled gem is installed.