Trying to get chef-server to start I get the following error:
[root#SCM: /etc/chef]$ /etc/init.d/chef-server-webui start
* Starting chef-server-webui
/usr/lib/ruby/1.8/rubygems/remote_fetcher.rb:14: uninitialized constant Gem::UserInteraction (NameError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:4
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /usr/lib/ruby/1.8/chef/provider/package/rubygems.rb:31
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /usr/lib/ruby/1.8/chef/providers.rb:59
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /usr/lib/ruby/1.8/chef.rb:25
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /usr/sbin/chef-server-webui:42
And here is my gem list
*** LOCAL GEMS ***
bundler (1.0.18)
bunny (0.7.6)
chef (0.10.4)
chef-server-webui (0.10.4)
coderay (1.0.0)
daemons (1.1.4)
erubis (2.7.0)
eventmachine (0.12.10)
extlib (0.9.15)
haml (3.1.3)
highline (1.6.2)
json (1.5.2, 1.4.6)
merb-assets (1.1.3)
merb-core (1.1.3)
merb-haml (1.1.3)
merb-helpers (1.1.3)
merb-param-protection (1.1.3)
mime-types (1.16)
mixlib-authentication (1.1.4)
mixlib-cli (1.2.2)
mixlib-config (1.1.2)
mixlib-log (1.3.0)
moneta (0.6.0)
net-ssh (2.1.4)
net-ssh-gateway (1.1.0)
net-ssh-multi (1.1)
ohai (0.6.4)
polyglot (0.3.2)
rack (1.3.3)
rake (0.9.2)
rest-client (1.6.7)
ruby-openid (2.1.8)
systemu (2.4.0)
thin (1.2.11)
treetop (1.4.10)
uuidtools (2.1.2)
yajl-ruby (1.0.0)
Here is a Chef bugtracker issue for exactly this problem. Short summary: Chef seems to pick up different versions of RubyGems from different places after it was upgraded.
Rewinding the upgrade to RubyGems seems to help.
Related
I am running Ruby version 3.1.2 and am trying to build my Jekyll website. Initially, when I run bundle exec jekyll build I get this error:
LoadError: cannot load such file -- rexml/parsers/baseparser
/Users/faraazkh/.gem/ruby/3.1.2/gems/kramdown-1.17.0/lib/kramdown/parser/html.rb:10:in `require'
/Users/faraazkh/.gem/ruby/3.1.2/gems/kramdown-1.17.0/lib/kramdown/parser/html.rb:10:in `<top (required)>'
/Users/faraazkh/.gem/ruby/3.1.2/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/html.rb:10:in `require'
/Users/faraazkh/.gem/ruby/3.1.2/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/html.rb:10:in `<top (required)>'
/Users/faraazkh/.gem/ruby/3.1.2/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/paragraph.rb:14:in `require'
/Users/faraazkh/.gem/ruby/3.1.2/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/paragraph.rb:14:in `<top (required)>'
/Users/faraazkh/.gem/ruby/3.1.2/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:345:in `require'
/Users/faraazkh/.gem/ruby/3.1.2/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:345:in `<class:Kramdown>'
/Users/faraazkh/.gem/ruby/3.1.2/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:60:in `<module:Parser>'
/Users/faraazkh/.gem/ruby/3.1.2/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:19:in `<module:Kramdown>'
/Users/faraazkh/.gem/ruby/3.1.2/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:17:in `<top (required)>'
/Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-3.8.6/lib/jekyll/converters/smartypants.rb:3:in `require'
/Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-3.8.6/lib/jekyll/converters/smartypants.rb:3:in `<top (required)>'
/Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-3.8.6/lib/jekyll.rb:13:in `require'
/Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-3.8.6/lib/jekyll.rb:13:in `block in require_all'
/Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-3.8.6/lib/jekyll.rb:12:in `each'
/Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-3.8.6/lib/jekyll.rb:12:in `require_all'
/Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-3.8.6/lib/jekyll.rb:194:in `<top (required)>'
/Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-3.8.6/exe/jekyll:8:in `require'
/Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-3.8.6/exe/jekyll:8:in `<top (required)>'
/Users/faraazkh/.gem/ruby/3.1.2/bin/jekyll:25:in `load'
/Users/faraazkh/.gem/ruby/3.1.2/bin/jekyll:25:in `<top (required)>'
To combat this, I then added gem "webrick" and gem "rexml", "~> 3.2" to the Gemfile and ran bundle install as recommended here.
However, now I run into this error:
jekyll 3.8.6 | Error: wrong number of arguments (given 2, expected 1)
/Users/faraazkh/.gem/ruby/3.1.2/gems/forwardable-extended-2.6.0/lib/forwardable/extended.rb:29:in `rb_delegate': wrong number of arguments (given 2, expected 1) (ArgumentError)
from /Users/faraazkh/.gem/ruby/3.1.2/gems/liquid-tag-parser-1.9.0/lib/liquid/tag/parser.rb:34:in `<class:Parser>'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/liquid-tag-parser-1.9.0/lib/liquid/tag/parser.rb:12:in `<class:Tag>'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/liquid-tag-parser-1.9.0/lib/liquid/tag/parser.rb:11:in `<module:Liquid>'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/liquid-tag-parser-1.9.0/lib/liquid/tag/parser.rb:10:in `<top (required)>'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-assets-3.0.12/lib/jekyll/assets/tag.rb:7:in `require'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-assets-3.0.12/lib/jekyll/assets/tag.rb:7:in `<top (required)>'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-assets-3.0.12/lib/jekyll/assets/context.rb:6:in `require_relative'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-assets-3.0.12/lib/jekyll/assets/context.rb:6:in `<top (required)>'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-assets-3.0.12/lib/jekyll/assets/filters.rb:5:in `require_relative'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-assets-3.0.12/lib/jekyll/assets/filters.rb:5:in `<top (required)>'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-assets-3.0.12/lib/jekyll/assets/env.rb:15:in `require_relative'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-assets-3.0.12/lib/jekyll/assets/env.rb:15:in `<top (required)>'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-assets-3.0.12/lib/jekyll/assets.rb:21:in `require_relative'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-assets-3.0.12/lib/jekyll/assets.rb:21:in `<top (required)>'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-assets-3.0.12/lib/jekyll-assets.rb:5:in `require_relative'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-assets-3.0.12/lib/jekyll-assets.rb:5:in `<top (required)>'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-3.8.6/lib/jekyll/external.rb:58:in `require'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-3.8.6/lib/jekyll/external.rb:58:in `block in require_with_graceful_fail'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-3.8.6/lib/jekyll/external.rb:55:in `each'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-3.8.6/lib/jekyll/external.rb:55:in `require_with_graceful_fail'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-3.8.6/lib/jekyll/plugin_manager.rb:30:in `require_gems'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-3.8.6/lib/jekyll/plugin_manager.rb:22:in `conscientious_require'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-3.8.6/lib/jekyll/site.rb:114:in `setup'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-3.8.6/lib/jekyll/site.rb:32:in `initialize'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-3.8.6/lib/jekyll/commands/build.rb:30:in `new'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-3.8.6/lib/jekyll/commands/build.rb:30:in `process'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-3.8.6/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/jekyll-3.8.6/exe/jekyll:15:in `<top (required)>'
from /Users/faraazkh/.gem/ruby/3.1.2/bin/jekyll:25:in `load'
from /Users/faraazkh/.gem/ruby/3.1.2/bin/jekyll:25:in `<top (required)>'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/bundler-1.17.2/lib/bundler/cli/exec.rb:74:in `load'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/bundler-1.17.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/bundler-1.17.2/lib/bundler/cli/exec.rb:28:in `run'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/bundler-1.17.2/lib/bundler/cli.rb:463:in `exec'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/bundler-1.17.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/bundler-1.17.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/bundler-1.17.2/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/bundler-1.17.2/lib/bundler/cli.rb:27:in `dispatch'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/bundler-1.17.2/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/bundler-1.17.2/lib/bundler/cli.rb:18:in `start'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/bundler-1.17.2/exe/bundle:30:in `block in <top (required)>'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/bundler-1.17.2/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
from /Users/faraazkh/.gem/ruby/3.1.2/gems/bundler-1.17.2/exe/bundle:22:in `<top (required)>'
from /Users/faraazkh/.gem/ruby/3.1.2/bin/bundle:25:in `load'
from /Users/faraazkh/.gem/ruby/3.1.2/bin/bundle:25:in `<main>'
Here is my Gemfile:
source "https://rubygems.org"
gem "autoprefixer-rails"
gem "html-proofer"
gem "image_optim"
gem "jekyll", '3.8.6'
gem "jekyll-assets"
gem "jekyll-paginate"
gem "jekyll-sitemap"
gem "jemoji"
gem "mini_magick"
gem "sass"
gem "sprockets", "~> 3.7"
gem "uglifier"
gem "webrick"
gem "rexml", "~> 3.2"
Here is my Gemfile.lock:
GEM
remote: https://rubygems.org/
specs:
activesupport (5.2.8)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
autoprefixer-rails (10.4.7.0)
execjs (~> 2)
colorator (1.1.0)
concurrent-ruby (1.1.10)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
ethon (0.15.0)
ffi (>= 1.15.0)
eventmachine (1.2.7)
execjs (2.8.1)
exifr (1.3.9)
extras (0.3.0)
forwardable-extended (~> 2.5)
fastimage (2.2.6)
ffi (1.15.5)
forwardable-extended (2.6.0)
fspath (3.1.2)
gemoji (3.0.1)
html-pipeline (2.14.2)
activesupport (>= 2)
nokogiri (>= 1.4)
html-proofer (3.19.4)
addressable (~> 2.3)
mercenary (~> 0.3)
nokogiri (~> 1.13)
parallel (~> 1.10)
rainbow (~> 3.0)
typhoeus (~> 1.3)
yell (~> 2.0)
http_parser.rb (0.8.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
image_optim (0.31.1)
exifr (~> 1.2, >= 1.2.2)
fspath (~> 3.0)
image_size (>= 1.5, < 4)
in_threads (~> 1.3)
progress (~> 3.0, >= 3.0.1)
image_size (3.0.2)
in_threads (1.6.0)
jekyll (3.8.6)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 2.0)
kramdown (~> 1.14)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-assets (3.0.12)
activesupport (~> 5.0)
execjs (~> 2.7)
extras (~> 0.2)
fastimage (~> 2.0, >= 1.8)
jekyll (>= 3.5, < 4.0)
jekyll-sanity (~> 1.2)
liquid-tag-parser (~> 1.0)
nokogiri (~> 1.8)
pathutil (~> 0.16)
sprockets (>= 3.3, < 4.1.beta)
jekyll-paginate (1.1.0)
jekyll-sanity (1.6.0)
jekyll (>= 3.1, < 5.0)
pathutil (~> 0.16)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-sitemap (1.4.0)
jekyll (>= 3.7, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
jemoji (0.12.0)
gemoji (~> 3.0)
html-pipeline (~> 2.2)
jekyll (>= 3.0, < 5.0)
kramdown (1.17.0)
liquid (4.0.3)
liquid-tag-parser (1.9.0)
extras (~> 0.3)
liquid (>= 3.0, < 5.0)
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
mini_magick (4.11.0)
mini_portile2 (2.8.0)
minitest (5.16.2)
nokogiri (1.13.6)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
parallel (1.22.1)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
progress (3.6.0)
public_suffix (4.0.7)
racc (1.6.0)
rack (2.2.4)
rainbow (3.1.1)
rb-fsevent (0.11.1)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (3.29.0)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
thread_safe (0.3.6)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (1.2.9)
thread_safe (~> 0.1)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
webrick (1.7.0)
yell (2.2.2)
PLATFORMS
ruby
DEPENDENCIES
autoprefixer-rails
html-proofer
image_optim
jekyll (= 3.8.6)
jekyll-assets
jekyll-paginate
jekyll-sitemap
jemoji
mini_magick
rexml (~> 3.2)
sass
sprockets (~> 3.7)
uglifier
webrick
BUNDLED WITH
1.17.2
I have tried this but no avail. Could not find a solution to this error anywhere else. Any help is much appreciated!
Thanks!
Ruby 3 breaks a few number of gems with this error message because of the separation of positional and keyword arguments in Ruby 3. See this for more info: Separation of positional and keyword arguments in Ruby 3.0
I was able to reproduce your exact problem. In your case it's jekyll-assets 3.0.12 which requires liquid-tag-parser 1.9.0 that creates the second error message. Unfortunately upgrading to Jekyll 4 will not solve this problem.
I found two solutions:
1. Downgrade to Ruby 2.7
This is by far the easiest way to fix this problem.
2. Use jekyll-assets from Github
Proceed at your own risk!
First you will need to use Jekyll 3.9.2 because of another problem between Ruby 3.X and the pathutil gem which is required by Jekyll 3.8.6. Jekyll 3.9.2 drops the dependency on pathutil. Change these lines in your Gemfile:
gem "jekyll", "~>3.9"
gem "sprockets"
You will also need to pull the latest code for jekyll-assets from Github. While looking at this problem, I found further issues with the wrong number of arguments in a few function calls in jekyll-assets. I submitted a pull request to fix those. Modify this line in your Gemfile to use this pull request as source for the gem:
gem "jekyll-assets", git: "https://github.com/envygeeks/jekyll-assets", ref: "refs/pull/666/head"
By doing this, I was able to install the gems and run Jekyll successfully with jekyll-assets. You may also want to consider using another plugin as jekyll-assets hasn't been updated in a few years.
Can you try with newer jekyll version?
So update Gemfile with:
gem "jekyll", "~> 4.2.2"
I'm trying to startup my sinatra application using shotgun but am having a bit of trouble. My app would run locally when I last checked 3 weeks ago and is currently still working on Heroku however I'm currently unable to run the program locally. When I run "ruby index.rb" I receive the following error:
/Users/xxx/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:118:in `require': unable to find a version of 'actionpack' to activate (Gem::LoadError)
from /Users/xxx/.rvm/gems/ruby-2.0.0-p451/gems/muni-0.0.8/lib/muni/prediction.rb:1:in `<top (required)>'
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/xxx/.rvm/gems/ruby-2.0.0-p451/gems/muni-0.0.8/lib/muni/stop.rb:2:in `<top (required)>'
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/xxx/.rvm/gems/ruby-2.0.0-p451/gems/muni-0.0.8/lib/muni/route.rb:4:in `<top (required)>'
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/xxx/.rvm/gems/ruby-2.0.0-p451/gems/muni-0.0.8/lib/muni.rb:2:in `<top (required)>'
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in `require'
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from index.rb:3:in `<main>'
When I shotgun the application I receive:
`Boot Error
Something went wrong while loading config.ru
RuntimeError: missing run or map statement
I have never seen either of these issues before nor has googling or searching stack overflow been much help. Here is what my gemfile looks like:
gem 'dotenv-rails', :groups => [:development, :test]
source "http://rubygems.org"
gem "sinatra"
gem "muni"
gem "shotgun"
gem "thin"
gem "actionpack"
and the corresponding gemfile.lock:
GEM
remote: http://rubygems.org/
specs:
actionpack (4.1.1)
actionview (= 4.1.1)
activesupport (= 4.1.1)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
actionview (4.1.1)
activesupport (= 4.1.1)
builder (~> 3.1)
erubis (~> 2.7.0)
activesupport (4.1.1)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
amatch (0.3.0)
tins (~> 1.0)
builder (3.2.2)
daemons (1.1.9)
dotenv (0.11.1)
dotenv-deployment (~> 0.0.2)
dotenv-deployment (0.0.2)
dotenv-rails (0.11.1)
dotenv (= 0.11.1)
erubis (2.7.0)
eventmachine (1.0.3)
i18n (0.6.9)
json (1.8.1)
minitest (5.3.5)
muni (0.0.8)
actionpack
amatch
thor
xml-simple
rack (1.5.2)
rack-protection (1.5.3)
rack
rack-test (0.6.2)
rack (>= 1.0)
shotgun (0.9)
rack (>= 1.0)
sinatra (1.4.5)
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
thin (1.6.2)
daemons (>= 1.0.9)
eventmachine (>= 1.0.0)
rack (>= 1.0.0)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
tins (1.3.0)
tzinfo (1.2.1)
thread_safe (~> 0.1)
xml-simple (1.1.3)
PLATFORMS
ruby
DEPENDENCIES
actionpack
dotenv-rails
muni
shotgun
sinatra
thin
Is this gem not currently working?
Thanks for all your help.
As far as I can tell, I've installed everything correctly, however I still can't run my program. To be clear, this was written on linux, and I'm now trying to run it on a windows machine.
I have the following gem list:
*** LOCAL GEMS ***
addressable (2.2.7, 2.2.6)
akami (1.2.2)
backports (3.6.0)
bcrypt (3.1.7 x64-mingw32)
bcrypt-ruby (3.1.5 x64-mingw32)
bigdecimal (1.2.0)
builder (3.2.2, 3.1.4)
bundle (0.0.1)
bundler (1.6.2)
daemons (1.1.9)
data_mapper (1.2.0)
data_objects (0.10.14)
dm-aggregates (1.2.0)
dm-constraints (1.2.0)
dm-core (1.2.0)
dm-do-adapter (1.2.0)
dm-migrations (1.2.0)
dm-serializer (1.2.2)
dm-sqlite-adapter (1.2.0)
dm-timestamps (1.2.0)
dm-transactions (1.2.0)
dm-types (1.2.2)
dm-validations (1.2.0)
do_sqlite3 (0.10.14)
encryptor (1.3.0)
fastercsv (1.5.5)
gyoku (1.1.1, 1.1.0)
haml (4.0.5)
httpi (2.1.0)
io-console (0.4.2)
json (1.8.1, 1.7.7)
json_pure (1.8.1)
mail (2.5.4)
mime-types (1.25.1)
mini_portile (0.5.3, 0.5.2)
minitest (4.3.2)
multi_json (1.9.2)
nokogiri (1.6.2.rc2 x64-mingw32)
nori (2.4.0)
polyglot (0.3.3)
pony (1.6.2)
psych (2.0.0)
puma (2.8.2)
rack (1.5.2)
rack-protection (1.5.2)
rack-test (0.6.2)
rake (0.9.6)
rdoc (4.0.0)
rubyntlm (0.3.4)
savon (2.5.0)
sinatra (1.4.4)
sinatra-contrib (1.4.2)
sinatra-static-assets (1.0.3)
sqlite3 (1.3.9 x64-mingw32)
stringex (1.5.1)
test-unit (2.0.0.0)
tilt (1.4.1)
treetop (1.4.15)
uuidtools (2.1.4)
wasabi (3.3.0)
sqlite3 was compiled from source, and installed using gem install sqlite3 -- --with-sqlite3-include=c:/sources/sqlite3 --with-sqlite3-lib=c:/sources/sqlite3/.libs to success.
The required gems in the main ruby file are:
require 'sinatra'
require 'sinatra/static_assets'
require 'sinatra/cookies'
require 'haml'
require 'savon'
require 'encryptor'
require 'pony'
require 'open-uri'
require 'json'
require 'data_mapper'
I should note running each of those requires inside irb all return true with no errors. When running ruby main.rb, I'm met with:
c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:126:in `require': cannot load such file -- do_sqlite3/2.0/do_sqlite3 (LoadError)
from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:126:in `require'
from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/backports-3.6.0/lib/backports/tools.rb:343:in `require_with_backports'
from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/do_sqlite3-0.10.14/lib/do_sqlite3.rb:32:in `rescue in <top (required)>'
from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/do_sqlite3-0.10.14/lib/do_sqlite3.rb:27:in `<top (required)>'
from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in `require'
from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/backports-3.6.0/lib/backports/tools.rb:343:in `require_with_backports'
from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/dm-sqlite-adapter-1.2.0/lib/dm-sqlite-adapter/adapter.rb:1:in `<top (required)>'
from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/backports-3.6.0/lib/backports/tools.rb:343:in `require_with_backports'
from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/dm-sqlite-adapter-1.2.0/lib/dm-sqlite-adapter.rb:1:in `<top (required)>'
from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in `require'
from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/backports-3.6.0/lib/backports/tools.rb:343:in `require_with_backports'
from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/dm-core-1.2.0/lib/dm-core/adapters.rb:163:in `load_adapter'
from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/dm-core-1.2.0/lib/dm-core/adapters.rb:133:in `adapter_class'
from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/dm-core-1.2.0/lib/dm-core/adapters.rb:13:in `new'
from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/dm-core-1.2.0/lib/dm-core.rb:230:in `setup'
from rxsite.rb:14:in `<main>'
Usually I would go through the steps I've tried so far to solve this, but I'm don't actually know where to start with this. I can only assume it's an issue with the way I installed sqlite3
Fixed this by removing x64 ruby, and installing x86 ruby.
Seems like a lot of problems stem from using the 64bit version.
I was able to debug my code with no issues until today. I don't know what I changed that could have effected this but now my
require "ruby-debug"
in my env.rb is causing the following when i try to run a feature...
cannot load such file -- irb/init (LoadError)
/usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
/usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
/usr/lib/ruby/1.9.1/irb.rb:13:in `<top (required)>'
/usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
/usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
/usr/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug/commands/irb.rb:1:in `<top (required)>'
/usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
/usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
/usr/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug/command.rb:51:in `block in load_commands'
/usr/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug/command.rb:50:in `each'
/usr/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug/command.rb:50:in `load_commands'
/usr/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug/command.rb:210:in `<module:Debugger>'
/usr/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug/command.rb:5:in `<top (required)>'
/usr/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:2:in `require_relative'
/usr/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:2:in `<top (required)>'
/usr/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:6:in `require_relative'
/usr/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:6:in `<top (required)>'
/usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in `require'
/usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
/usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:35:in `require'
/cygdrive/c/zap2it.com_acceptance_tests/features/support/env.rb:10:in `<top (required)>'
/usr/lib/ruby/gems/1.9.1/gems/cucumber-1.2.3/lib/cucumber/rb_support/rb_language.rb:137:in `load'
/usr/lib/ruby/gems/1.9.1/gems/cucumber-1.2.3/lib/cucumber/rb_support/rb_language.rb:137:in `load_code_file'
/usr/lib/ruby/gems/1.9.1/gems/cucumber-1.2.3/lib/cucumber/runtime/support_code.rb:180:in `load_file'
/usr/lib/ruby/gems/1.9.1/gems/cucumber-1.2.3/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/usr/lib/ruby/gems/1.9.1/gems/cucumber-1.2.3/lib/cucumber/runtime/support_code.rb:82:in `each'
/usr/lib/ruby/gems/1.9.1/gems/cucumber-1.2.3/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/usr/lib/ruby/gems/1.9.1/gems/cucumber-1.2.3/lib/cucumber/runtime.rb:182:in `load_step_definitions'
/usr/lib/ruby/gems/1.9.1/gems/cucumber-1.2.3/lib/cucumber/runtime.rb:41:in `run!'
/usr/lib/ruby/gems/1.9.1/gems/cucumber-1.2.3/lib/cucumber/cli/main.rb:43:in `execute!'
/usr/lib/ruby/gems/1.9.1/gems/cucumber-1.2.3/lib/cucumber/cli/main.rb:20:in `execute'
/usr/lib/ruby/gems/1.9.1/gems/cucumber-1.2.3/bin/cucumber:14:in `<top (required)>'
/usr/bin/cucumber:23:in `load'
/usr/bin/cucumber:23:in `<main>'
If I remove it everything runs fine but i still do not have debugging capabilities.
Any ideas on what could be causing this?
So weeks later and I'm still having this issue, I've tried uninstall-reinstall all my gems and tried ruby-debug19, ruby-debug-base19, and debugger. I've tried requiring 'debugger' or 'ruby-debug' in my env file but still same error. Could it be i'm missing another needed library?
Here is the GemFile.lock:
GEM
remote: https://rubygems.org/
specs:
archive-tar-minitar (0.5.2)
builder (3.2.0)
capybara (2.1.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
childprocess (0.3.9)
ffi (~> 1.0, >= 1.0.11)
columnize (0.3.6)
commonwatir (4.0.0)
cucumber (1.2.3)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.11.6)
multi_json (~> 1.3)
diff-lcs (1.2.1)
ffi (1.5.0)
gherkin (2.11.6)
json (>= 1.7.6)
httpclient (2.3.2)
json (1.7.7)
linecache19 (0.5.12)
ruby_core_source (>= 0.1.4)
mime-types (1.23)
multi_json (1.7.1)
nokogiri (1.5.9)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rake (10.0.3)
rspec (2.13.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
rspec-core (2.13.1)
rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.0)
ruby-debug-base19 (0.11.25)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
ruby_core_source (>= 0.1.4)
ruby-debug19 (0.11.6)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
ruby-debug-base19 (>= 0.11.19)
ruby_core_source (0.1.5)
archive-tar-minitar (>= 0.5.2)
rubyzip (0.9.9)
selenium-webdriver (2.31.0)
childprocess (>= 0.2.5)
multi_json (~> 1.0)
rubyzip
websocket (~> 1.0.4)
watir (4.0.2)
commonwatir (~> 4)
watir-webdriver
watir-webdriver (0.6.2)
selenium-webdriver (>= 2.18.0)
websocket (1.0.7)
xpath (2.0.0)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
capybara
cucumber
httpclient
nokogiri
rake
rspec
ruby-debug19
selenium-webdriver
watir
watir-webdriver
And the GemFile:
source 'https://rubygems.org'
gem 'rake'
gem 'nokogiri'
gem 'httpclient'
group :test do
gem 'rspec'
gem 'cucumber'
gem 'watir'
gem 'watir-webdriver'
gem 'selenium-webdriver'
gem 'capybara'
end
Have you updated rails or ruby lately?
I do not remember which version update that causes problems but I think the error message looks like some I got after an update. After which the ruby-debug is no longer supported.
After some digging I found the following gems as substitution:
gem 'ruby-debug-base19x'
gem 'ruby-debug19'
These are however outdated, so maybe look into the debugger gem
The solution for this problem is to remove and install as here or
sudo apt-get install libreadline-dev
rvm remove 1.9.3
rvm install 1.9.3
Then add to your Gemfile:
gem 'rb-readline
as here
I have been trying to use heroku with my rails app. I've gem install heroku and listed it in my gemfile, but everytime I try to do anything with it I keep getting this error...
/Users/alex/.rvm/gems/ruby-1.9.2-p180/gems/mime-types-1.17.1/lib/mime/types.rb:755:in `split': invalid byte sequence in US-ASCII (ArgumentError)
from /Users/alex/.rvm/gems/ruby-1.9.2-p180/gems/mime-types-1.17.1/lib/mime/types.rb:755:in `load_from_file'
from /Users/alex/.rvm/gems/ruby-1.9.2-p180/gems/mime-types-1.17.1/lib/mime/types.rb:838:in `block in <class:Types>'
from /Users/alex/.rvm/gems/ruby-1.9.2-p180/gems/mime-types-1.17.1/lib/mime/types.rb:838:in `each'
from /Users/alex/.rvm/gems/ruby-1.9.2-p180/gems/mime-types-1.17.1/lib/mime/types.rb:838:in `<class:Types>'
from /Users/alex/.rvm/gems/ruby-1.9.2-p180/gems/mime-types-1.17.1/lib/mime/types.rb:578:in `<module:MIME>'
from /Users/alex/.rvm/gems/ruby-1.9.2-p180/gems/mime-types-1.17.1/lib/mime/types.rb:4:in `<top (required)>'
from /Users/alex/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in `require'
from /Users/alex/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in `require'
from /Users/alex/.rvm/gems/ruby-1.9.2-p180/gems/rest-client-1.6.7/lib/restclient/request.rb:2:in `<top (required)>'
from /Users/alex/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in `require'
from /Users/alex/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in `require'
from /Users/alex/.rvm/gems/ruby-1.9.2-p180/gems/rest-client-1.6.7/lib/restclient.rb:13:in `<top (required)>'
from /Users/alex/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in `require'
from /Users/alex/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in `require'
from /Users/alex/.rvm/gems/ruby-1.9.2-p180/gems/rest-client-1.6.7/lib/rest_client.rb:2:in `<top (required)>'
from /Users/alex/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in `require'
from /Users/alex/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in `require'
from /Users/alex/.rvm/gems/ruby-1.9.2-p180/gems/heroku-2.11.0/lib/heroku/client.rb:2:in `<top (required)>'
from /Users/alex/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in `require'
from /Users/alex/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in `require'
from /Users/alex/.rvm/gems/ruby-1.9.2-p180/gems/heroku-2.11.0/lib/heroku.rb:6:in `<top (required)>'
from /Users/alex/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in `require'
from /Users/alex/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in `require'
from /Users/alex/.rvm/gems/ruby-1.9.2-p180/gems/heroku-2.11.0/bin/heroku:6:in `<top (required)>'
from /Users/alex/.rvm/gems/ruby-1.9.2-p180/bin/heroku:19:in `load'
from /Users/alex/.rvm/gems/ruby-1.9.2-p180/bin/heroku:19:in `<main>'
I'm new to rails so would appreciate help if anybody knows whats gone wrong. I've googled it but can't seem to find the same problem.
These are the list of gems I currently have installed incase that may be the cause:
*** LOCAL GEMS ***
actionmailer (3.1.1, 3.1.0)
actionpack (3.1.1, 3.1.0)
activemodel (3.1.1, 3.1.0)
activerecord (3.1.1, 3.1.0)
activeresource (3.1.1, 3.1.0)
activesupport (3.1.1, 3.1.0)
addressable (2.2.6)
ansi (1.3.0)
arel (2.2.1)
bcrypt-ruby (3.0.1, 3.0.0)
builder (3.0.0)
bundler (1.0.21, 1.0.18)
coffee-rails (3.1.1, 3.1.0)
coffee-script (2.2.0)
coffee-script-source (1.1.2)
daemons (1.1.4)
devise (1.4.9, 1.4.8)
erubis (2.7.0)
eventmachine (0.12.10)
execjs (1.2.9, 1.2.4)
heroku (2.11.0)
hike (1.2.1)
i18n (0.6.0)
jquery-rails (1.0.16, 1.0.14, 1.0.13)
json (1.6.1)
launchy (2.0.5)
mail (2.3.0)
mime-types (1.17.1, 1.16)
multi_json (1.0.3)
orm_adapter (0.0.5)
pg (0.11.0)
polyglot (0.3.2)
rack (1.3.5, 1.3.3, 1.3.2)
rack-cache (1.1, 1.0.3)
rack-mount (0.8.3)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.1.0)
railties (3.1.1, 3.1.0)
rake (0.9.2.2, 0.9.2)
rdoc (3.11, 3.9.4)
rest-client (1.6.7)
rubyzip (0.9.4)
sass (3.1.10, 3.1.7)
sass-rails (3.1.4, 3.1.2, 3.1.0)
sprockets (2.0.3, 2.0.0)
sqlite3 (1.3.4)
term-ansicolor (1.0.7)
thin (1.2.11)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
turn (0.8.3, 0.8.2)
tzinfo (0.3.30, 0.3.29)
uglifier (1.0.4, 1.0.3, 1.0.2)
warden (1.0.6)
All the other gems work fine though. It's just the Heroku one that throws up an error.
Thanks.
I think I had done a gem update + bundle update and that was what was messing it up.
I've uninstalled mime-types 1.17.1 and all seems to be working ok now. I had to uninstall it though. Even when I set the app to use version 1.16 it still came up with the same errors when I tried to do anything with Heroku.
You don't need to include Heroku into your gemfile.
This issue is fixed with mime-types 1.17.2, just released. I could not reproduce the issue on Mac OS X, but the problem was fairly easy to fix.