Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find gem 'kramdown' in https://github.com/gettalong/kramdown.git #789

Closed
anon987654321 opened this issue Jun 28, 2023 · 5 comments
Assignees
Labels

Comments

@anon987654321
Copy link

Gemfile

gem "kramdown", github: "gettalong/kramdown"

Anybody know? Thanks!

@anon987654321
Copy link
Author

ruby 3.2.2 + Rails 7.1.alpha

@gettalong gettalong self-assigned this Jun 28, 2023
@gettalong
Copy link
Owner

You need to use

gem "kramdown"

without the github specifier.

@anon987654321
Copy link
Author

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!

@anon987654321
Copy link
Author

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.

@gettalong
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants