Unresolved specs during Gem::Specification.reset:
I was seeing this issue by just running RSpec on its own. From what I understand, this means that you have more than one version of the listed gems installed on your system, and RSpec is unsure which one to use. After uninstalling older version of the gems, the warnings went away.
You can try:
gem cleanup lumberjack
Or:
gem list lumberjack
gem uninstall lumberjack
If you're using Bundler, you can try bundle exec guard
(or in my case bundle exec rspec
).
Bundler Issues - Unresolved Specs
bundle exec
assures that a ruby program that will be run inside it will use gems specified by Gemfile
for the project you're in. It helps when you have multiple version of gems installed - chooses proper versions instead of the default/newest ones.
In your case the error message says You have already activated public_suffix 3.0.2, but your Gemfile requires public_suffix 2.0.5.
You have a newer version of a gem installed, but you need an older one. That's why jekyll serve
cannot start without prepending with bundle exec
.
You can separate your gems using gemsets to avoid this issue. As you just need to use jekyll, I'd recommend though to use an alias though. It's easier and I think there is no need to do anything fancy here.
librarian-puppet, rbenv, unresolved specs during Gem::Specification.reset
Got around this by just not using librarian-puppet any more. Also split all the Puppet stuff off into it's own repo because we moved to a Puppet master setup instead of solo Puppet.
Jekyll / gem: Unresolved specs
It seems that you're not the only one to have this kind of problem. See issue here.
I managed to bypass this problem in two ways.
On Jekyll 2.5.x, removing Gemfile
simply make the error disappear.
If Gemfile is needed, a bundle exec jekyll serve
is ok.
How to remove Minitest from existing Rails 6 app?
What I would do is create one test installation of rails with unit tests and one without:
rails new tester
and
rails new tester --skip-test
you would have to do this in separate folders so the they wouldn't collide.
You could then do a diff between the two folders to find what you need to change in your installation.
Visual studio code has a plugin called "Compare Folders" which should do the trick.
--- After doing the above ---
It looks like the only things you need to do are:
Remove the test section in your Gemfile
run
bundle
then change the config/application.rb file as follows:
from
require_relative "boot"
require "rails/all"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module Tester
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 6.1
# Configuration for the application, engines, and railties goes here.
#
# These settings can be overridden in specific environments using the files
# in config/environments, which are processed later.
#
# config.time_zone = "Central Time (US & Canada)"
# config.eager_load_paths << Rails.root.join("extras")
end
end
to
require_relative "boot"
require "rails"
# Pick the frameworks you want:
require "active_model/railtie"
require "active_job/railtie"
require "active_record/railtie"
require "active_storage/engine"
require "action_controller/railtie"
require "action_mailer/railtie"
require "action_mailbox/engine"
require "action_text/engine"
require "action_view/railtie"
require "action_cable/engine"
require "sprockets/railtie"
# require "rails/test_unit/railtie"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module Tester
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 6.1
# Configuration for the application, engines, and railties goes here.
#
# These settings can be overridden in specific environments using the files
# in config/environments, which are processed later.
#
# config.time_zone = "Central Time (US & Canada)"
# config.eager_load_paths << Rails.root.join("extras")
# Don't generate system test files.
config.generators.system_tests = nil
end
end
This was using Rails 6.1.3.
Related Topics
Learning Insertion Sort in Ruby
Ruby on Rails Best Practices - Big Controller VS Small Controller
What Evaluates to False in Ruby
Why Does Ruby'S 'Gets' Includes the Closing Newline
Why Are Symbols in Ruby Not Thought of as a Type of Variable
Is There an Inverse 'Member' Method in Ruby
Installing Jekyll Without Root
How to Avoid Nomethoderror For Nil Elements When Accessing Nested Hashes
Heroku Not Sending Email With Gmail Smtp
What Does the "||=" Operand Stand for in Ruby
Why Does Adding "Sleep 1" in an After Hook Cause This Rspec/Capybara Test to Pass