Closed anon987654321 closed 1 year ago
ruby 3.2.2 + Rails 7.1.alpha
You need to use
gem "kramdown"
without the github specifier.
Hi,
But I always use that specifier as a sort of convention. Among all my hundreds of gems, only Kramdown gives me this problem.
I'll try coming up with a solution. Thanks!
I figured it out and wrote kramdown.gemspec
:
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'kramdown/version'
Gem::Specification.new do |spec|
spec.name = "kramdown"
spec.version = Kramdown::VERSION
spec.authors = ["Thomas Leitner"]
spec.email = ["t_leitner@gmx.at"]
spec.summary = %q{Kramdown is a fast, pure Ruby Markdown superset converter.}
spec.description = %q{Kramdown is a fast, pure Ruby Markdown superset converter, using a strict syntax definition and supporting several common extensions.}
spec.homepage = "https://kramdown.gettalong.org/"
spec.license = "MIT"
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
spec.add_dependency "coderay", "~> 1.1"
spec.add_dependency "rouge", "~> 2.0"
end
However then I noticed you have it in your .gitignore
, why's that? Having it should offer many benefits:
Ease of use for developers: Developers will be able to use Bundler's GitHub shorthand to specify the Kramdown gem in their Gemfile. This is simpler and more intuitive than the current method, which involves cloning the repository, building the gem manually, and specifying the path to the built gem in the Gemfile.
Increased adoption: By making it easier to use the Kramdown gem directly from the repository, we can potentially increase its adoption. Developers who were previously deterred by the complex installation process might be more inclined to use the gem if they can specify it easily in their Gemfile.
Up-to-date usage: Developers can get updates as soon as they are pushed to the repository. This can be particularly beneficial for developers who want to use the latest features or bug fixes before they are included in a released version of the gem.
So, this is not an "issue". You should, by default, rely only on released versions. If you rely on versions on Github, you might rely on something that is not stable or tested. You can't assume that a repository holds a state that is usable. This might be the case for many but still, mistakes are easy.
What complex installation routine? If you want kramdown, you run gem install kramdown
or you specify gem 'kramdown'
in your Gemfile. This is neither easier nor harder than any other gem.
So with kramdown you have a conscious choice to make: You use the released version (the easy way) or use a potentially unstable version (the harder way because you need to clone the repo and create a Gemfile). It is up to you.
Gemfile
Anybody know? Thanks!