superclass mismatch for class SpecificationPolicy - ruby

I'm getting a superclass mismatch for class SpecificationPolicy error when trying to install or upgrade certain brew packages.
For example, when updating installing the supabase CLI (brew install supabase/tap/supabase):
==> Installing supabase from supabase/tap
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:12: warning: already initialized constant Gem::VERSION
/Library/Ruby/Site/2.6.0/rubygems.rb:11: warning: previous definition of VERSION was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/compatibility.rb:14: warning: already initialized constant Gem::RubyGemsVersion
/Library/Ruby/Site/2.6.0/rubygems/compatibility.rb:15: warning: previous definition of RubyGemsVersion was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/compatibility.rb:18: warning: already initialized constant Gem::RbConfigPriorities
/Library/Ruby/Site/2.6.0/rubygems/compatibility.rb:18: warning: previous definition of RbConfigPriorities was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/compatibility.rb:27: warning: constant Gem::ConfigMap is deprecated
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/compatibility.rb:35: warning: constant Gem::ConfigMap is deprecated
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/defaults.rb:3: warning: already initialized constant Gem::DEFAULT_HOST
/Library/Ruby/Site/2.6.0/rubygems/defaults.rb:3: warning: previous definition of DEFAULT_HOST was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:117: warning: already initialized constant Gem::RUBYGEMS_DIR
/Library/Ruby/Site/2.6.0/rubygems.rb:115: warning: previous definition of RUBYGEMS_DIR was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:122: warning: already initialized constant Gem::WIN_PATTERNS
/Library/Ruby/Site/2.6.0/rubygems.rb:129: warning: previous definition of WIN_PATTERNS was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:131: warning: already initialized constant Gem::GEM_DEP_FILES
/Library/Ruby/Site/2.6.0/rubygems.rb:138: warning: previous definition of GEM_DEP_FILES was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:141: warning: already initialized constant Gem::REPOSITORY_SUBDIRECTORIES
/Library/Ruby/Site/2.6.0/rubygems.rb:148: warning: previous definition of REPOSITORY_SUBDIRECTORIES was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:153: warning: already initialized constant Gem::REPOSITORY_DEFAULT_GEM_SUBDIRECTORIES
/Library/Ruby/Site/2.6.0/rubygems.rb:161: warning: previous definition of REPOSITORY_DEFAULT_GEM_SUBDIRECTORIES was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:162: warning: already initialized constant Gem::READ_BINARY_ERRORS
/Library/Ruby/Site/2.6.0/rubygems.rb:169: warning: previous definition of READ_BINARY_ERRORS was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:172: warning: already initialized constant Gem::WRITE_BINARY_ERRORS
/Library/Ruby/Site/2.6.0/rubygems.rb:174: warning: previous definition of WRITE_BINARY_ERRORS was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:185: warning: already initialized constant Gem::LOADED_SPECS_MUTEX
/Library/Ruby/Site/2.6.0/rubygems.rb:181: warning: previous definition of LOADED_SPECS_MUTEX was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:1345: warning: already initialized constant Gem::MARSHAL_SPEC_DIR
/Library/Ruby/Site/2.6.0/rubygems.rb:1319: warning: previous definition of MARSHAL_SPEC_DIR was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/version.rb:157: warning: already initialized constant Gem::Version::VERSION_PATTERN
/Library/Ruby/Site/2.6.0/rubygems/version.rb:157: warning: previous definition of VERSION_PATTERN was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/version.rb:158: warning: already initialized constant Gem::Version::ANCHORED_VERSION_PATTERN
/Library/Ruby/Site/2.6.0/rubygems/version.rb:158: warning: previous definition of ANCHORED_VERSION_PATTERN was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/requirement.rb:17: warning: already initialized constant Gem::Requirement::OPS
/Library/Ruby/Site/2.6.0/rubygems/requirement.rb:12: warning: previous definition of OPS was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/requirement.rb:27: warning: already initialized constant Gem::Requirement::SOURCE_SET_REQUIREMENT
/Library/Ruby/Site/2.6.0/rubygems/requirement.rb:22: warning: previous definition of SOURCE_SET_REQUIREMENT was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/requirement.rb:30: warning: already initialized constant Gem::Requirement::PATTERN_RAW
/Library/Ruby/Site/2.6.0/rubygems/requirement.rb:25: warning: previous definition of PATTERN_RAW was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/requirement.rb:35: warning: already initialized constant Gem::Requirement::PATTERN
/Library/Ruby/Site/2.6.0/rubygems/requirement.rb:30: warning: previous definition of PATTERN was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/requirement.rb:40: warning: already initialized constant Gem::Requirement::DefaultRequirement
/Library/Ruby/Site/2.6.0/rubygems/requirement.rb:35: warning: previous definition of DefaultRequirement was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/requirement.rb:314: warning: already initialized constant Gem::Version::Requirement
/Library/Ruby/Site/2.6.0/rubygems/requirement.rb:311: warning: previous definition of Requirement was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/platform.rb:198: warning: already initialized constant Gem::Platform::RUBY
/Library/Ruby/Site/2.6.0/rubygems/platform.rb:204: warning: previous definition of RUBY was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/platform.rb:204: warning: already initialized constant Gem::Platform::CURRENT
/Library/Ruby/Site/2.6.0/rubygems/platform.rb:210: warning: previous definition of CURRENT was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/stub_specification.rb:9: warning: already initialized constant Gem::StubSpecification::PREFIX
/Library/Ruby/Site/2.6.0/rubygems/stub_specification.rb:9: warning: previous definition of PREFIX was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/stub_specification.rb:12: warning: already initialized constant Gem::StubSpecification::OPEN_MODE
/Library/Ruby/Site/2.6.0/rubygems/stub_specification.rb:12: warning: previous definition of OPEN_MODE was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/stub_specification.rb:18: warning: already initialized constant Gem::StubSpecification::StubLine::NO_EXTENSIONS
/Library/Ruby/Site/2.6.0/rubygems/stub_specification.rb:18: warning: previous definition of NO_EXTENSIONS was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/stub_specification.rb:21: warning: already initialized constant Gem::StubSpecification::StubLine::REQUIRE_PATHS
/Library/Ruby/Site/2.6.0/rubygems/stub_specification.rb:21: warning: previous definition of REQUIRE_PATHS was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/stub_specification.rb:31: warning: already initialized constant Gem::StubSpecification::StubLine::REQUIRE_PATH_LIST
/Library/Ruby/Site/2.6.0/rubygems/stub_specification.rb:31: warning: previous definition of REQUIRE_PATH_LIST was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification_policy.rb:4:in `<top (required)>': superclass mismatch for class SpecificationPolicy (TypeError)
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:16:in `<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:1365:in `<module:Gem>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:116:in `<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /usr/local/Homebrew/Library/Homebrew/utils/gems.rb:47:in `setup_gem_environment!'
from /usr/local/Homebrew/Library/Homebrew/standalone/load_path.rb:13:in `<top (required)>'
from /usr/local/Homebrew/Library/Homebrew/startup.rb:6:in `require_relative'
from /usr/local/Homebrew/Library/Homebrew/startup.rb:6:in `<top (required)>'
from /usr/local/Homebrew/Library/Homebrew/global.rb:4:in `require_relative'
from /usr/local/Homebrew/Library/Homebrew/global.rb:4:in `<top (required)>'
from /usr/local/Homebrew/Library/Homebrew/build.rb:11:in `require_relative'
from /usr/local/Homebrew/Library/Homebrew/build.rb:11:in `<main>'
Error: Failure while executing; `/usr/bin/sandbox-exec -f /private/tmp/homebrew20221102-2820-wkxj9g.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -W1 -- /usr/local/Homebrew/Library/Homebrew/build.rb /usr/local/Homebrew/Library/Taps/supabase/homebrew-tap/supabase.rb` exited with 1.
I noticed that this error also occurs when doing a brew upgrade on a different library, brew upgrade heroku.
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification_policy.rb:4:in `<top (required)>': superclass mismatch for class SpecificationPolicy (TypeError)
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:16:in `<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:1365:in `<module:Gem>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:116:in `<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /usr/local/Homebrew/Library/Homebrew/utils/gems.rb:47:in `setup_gem_environment!'
from /usr/local/Homebrew/Library/Homebrew/standalone/load_path.rb:13:in `<top (required)>'
from /usr/local/Homebrew/Library/Homebrew/startup.rb:6:in `require_relative'
from /usr/local/Homebrew/Library/Homebrew/startup.rb:6:in `<top (required)>'
from /usr/local/Homebrew/Library/Homebrew/global.rb:4:in `require_relative'
from /usr/local/Homebrew/Library/Homebrew/global.rb:4:in `<top (required)>'
from /usr/local/Homebrew/Library/Homebrew/build.rb:11:in `require_relative'
from /usr/local/Homebrew/Library/Homebrew/build.rb:11:in `<main>'
Error: Failure while executing; `/usr/bin/sandbox-exec -f /private/tmp/homebrew20221102-5824-12bp753.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -W1 -- /usr/local/Homebrew/Library/Homebrew/build.rb /usr/local/Homebrew/Library/Taps/heroku/homebrew-brew/Formula/heroku-node.rb` exited with 1.
I'm using rvm to manage my ruby versions and which ruby gives /Users/username/.rvm/rubies/ruby-3.0.0/bin/ruby. So not sure where the "Ruby.framework/Versions/2.6" in the error log is coming from.
Seems like an issue between Homebrew and ruby. May be related to the most recent xcode and MacOS Ventura updates (other reports of this error here and here)?
Anyone have any ideas or get past this issue?

I came across this, which suggested that to "clean up system Ruby properly", one could run:
sudo rm -rf \
/Library/Ruby/Gems/2.6.0/{build_info,cache,doc,extensions,gems} \
/Library/Ruby/Gems/2.6.0/specifications/*.gemspec \
/Library/Ruby/Site
I did this, re-ran the brew commands above, and the error was gone!
Not sure exactly what happened, maybe upgrading xcode and/or to MacOS Ventura messed with the system Ruby installation, which the above commands "clean up". It's also unclear why which ruby pointed to the updated ruby version installed by rvm, yet installing certain packages via Homebrew seemed to be invoking Mac's system Ruby (2.6.0). 🤷

Related

Ruby: Bundler's Mustermann `initialize` wrong number of arguments (given 2, expected 1) (ArgumentError)

I am following the steps of a GitHub tutorial on setting up a dev environment to create a GitHub app. Unfortunately, I'm stuck on Step 6 of the tutorial, as when I enter bundle exec ruby template_server.rb I receive this error:
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-1.17.1/lib/bundler/shared_helpers.rb:29: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-1.17.1/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-1.17.1/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-1.17.1/lib/bundler/shared_helpers.rb:29: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-1.17.1/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-1.17.1/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-1.17.1/lib/bundler/shared_helpers.rb:35: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-1.17.1/lib/bundler/shared_helpers.rb:35: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-1.17.1/lib/bundler/shared_helpers.rb:44: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-1.17.1/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mustermann-1.0.3/lib/mustermann/regular.rb:22:in `initialize': wrong number of arguments (given 2, expected 1) (ArgumentError)
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mustermann-1.0.3/lib/mustermann/pattern.rb:59:in `new'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mustermann-1.0.3/lib/mustermann/pattern.rb:59:in `block in new'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mustermann-1.0.3/lib/mustermann/equality_map.rb:43:in `fetch'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mustermann-1.0.3/lib/mustermann/pattern.rb:59:in `new'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mustermann-1.0.3/lib/mustermann.rb:67:in `new'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mustermann-1.0.3/lib/mustermann.rb:70:in `block in new'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mustermann-1.0.3/lib/mustermann.rb:70:in `map'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mustermann-1.0.3/lib/mustermann.rb:70:in `new'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:1641:in `compile'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:1629:in `compile!'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:1271:in `error'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:1838:in `<class:Base>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:894:in `<module:Sinatra>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:22:in `<top (required)>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/sinatra-2.0.4/lib/sinatra/main.rb:1:in `require'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/sinatra-2.0.4/lib/sinatra/main.rb:1:in `<top (required)>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/sinatra-2.0.4/lib/sinatra.rb:1:in `require'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/sinatra-2.0.4/lib/sinatra.rb:1:in `<top (required)>'
from template_server.rb:1:in `require'
from template_server.rb:1:in `<main>'
I haven't changed either the Gemfile or the Gemfile.lock (they're the same as the ones in the tutorial so I provided their hyperlinks) and from what I've read so far there must be something outdated, but I'm not sure what exactly. Thanks!

Homebrew broken - "cannot load such file -- vendor/bundle/bundler/setup (LoadError)"

Every time I try to run a brew command, it gives the following error:
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- vendor/bundle/bundler/setup (LoadError)
from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/Homebrew/Library/Homebrew/load_path.rb:7:in `<top (required)>'
from /usr/local/Homebrew/Library/Homebrew/global.rb:8:in `require_relative'
from /usr/local/Homebrew/Library/Homebrew/global.rb:8:in `<top (required)>'
from /usr/local/Homebrew/Library/Homebrew/brew.rb:17:in `require_relative'
from /usr/local/Homebrew/Library/Homebrew/brew.rb:17:in `<main>'
I'm not sure if this is an issue with my Ruby/Bundler, since bundler works completely fine in other cases. What might the problem be?
brew update-reset && brew update worked for me.

time_zone.rb:270: warning: circular argument reference - now

I'm using Ruby on Rails, and I installed all the necessary applications and updates for gems. I already exhausted/researched most of all possible answer for this error and tried all of it, but still am having no luck.
/Users/u=Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-3.2.13/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now
/Users/Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/runtime.rb:76:in `require': cannot load such file -- false (LoadError)
from /Users/Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /Users/Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/runtime.rb:72:in `each'
from /Users/Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/runtime.rb:72:in `block in require'
from /Users/Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/runtime.rb:61:in `each'
from /Users/Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/runtime.rb:61:in `require'
from /Users/Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler.rb:134:in `require'
from /Users/Username/Downloads/job4quote/config/application.rb:7:in `'
from /Users/Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
from /Users/Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-3.2.13/lib/rails/commands.rb:53:in `block in '
from /Users/Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /Users/Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-3.2.13/lib/rails/commands.rb:50:in `'
from script/rails:6:in `require'
from script/rails:6:in `'
Is there a way to access these .rb files to make necessary changes?
As shown here -> warning: circular argument reference
The problem seems to be caused by the higher version of ruby (In my case rails 3.2.13 and ruby 2.2) and using an older version of rails. One solution in which worked for me was to use ruby 2.0 and to update my gem file (RVM Capistrano).
gem 'rvm-capistrano', require: false
run the bundle install command. After that everything worked as expected.
silly of me, you can access the file by browsing it thru terminal
$ open .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-3.2.13/lib/active_support/values
and made changes on that file as shown on the link about.
Sorry new with ruby.

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

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

Fixing pry under Ubuntu

I've installed new version of ruby - 1.9.3-p125 and then i've got the problem with pry
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:11: warning: already initialized constant DEFAULT_HOOKS
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:22: warning: already initialized constant DEFAULT_PRINT
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:47: warning: already initialized constant SIMPLE_PRINT
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:56: warning: already initialized constant CLIPPED_PRINT
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:61: warning: already initialized constant DEFAULT_EXCEPTION_HANDLER
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:67: warning: already initialized constant DEFAULT_EXCEPTION_WHITELIST
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:70: warning: already initialized constant DEFAULT_PROMPT
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:81: warning: already initialized constant SIMPLE_PROMPT
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:83: warning: already initialized constant SHELL_PROMPT
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:90: warning: already initialized constant NAV_PROMPT
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:106: warning: already initialized constant DEFAULT_CONTROL_D_HANDLER
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:120: warning: already initialized constant DEFAULT_SYSTEM
/home/megas/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- readline (LoadError)
from /home/megas/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:163:in `<top (required)>'
from /home/megas/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/megas/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/bin/pry:12:in `rescue in <top (required)>'
from /home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/bin/pry:8:in `<top (required)>'
from /home/megas/.rvm/gems/ruby-1.9.3-p125/bin/pry:19:in `load'
from /home/megas/.rvm/gems/ruby-1.9.3-p125/bin/pry:19:in `<main>'
I've tried to fix this problem by this article but after make command I got answer
Nothing to be done for `all’
How to resolve this problem? Thanks
P.S. Ubuntu 11.10, 64bit
Hey megas have you got lncurses installed? If not try:
sudo apt-get install libncurses5-dev libreadline5-dev
Got that from this Blogpost which seems to have some similarity to your problem.
Solution:
rvm uninstall 1.9.3-p125
sudo apt-get install libreadline-dev
rvm install 1.9.3-p125 --with-readline-dir=/usr/include/readline

Resources