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

Rdoc is always required #544

Closed
xHire opened this issue May 16, 2017 · 1 comment · Fixed by #683
Closed

Rdoc is always required #544

xHire opened this issue May 16, 2017 · 1 comment · Fixed by #683

Comments

@xHire
Copy link

xHire commented May 16, 2017

I’m trying to setup an application to use maruku as apipie markup and I don’t have rdoc gem installed. However, I constantly run into:

/home/xhire/.gem/ruby/2.2.0/gems/activesupport-5.0.3/lib/active_support/dependencies.rb:293:in `require': cannot load such file -- rdoc (LoadError)
	from /home/xhire/.gem/ruby/2.2.0/gems/activesupport-5.0.3/lib/active_support/dependencies.rb:293:in `block in require'
	from /home/xhire/.gem/ruby/2.2.0/gems/activesupport-5.0.3/lib/active_support/dependencies.rb:259:in `load_dependency'
	from /home/xhire/.gem/ruby/2.2.0/gems/activesupport-5.0.3/lib/active_support/dependencies.rb:293:in `require'
	from /home/xhire/.gem/ruby/2.2.0/gems/apipie-rails-0.5.1/lib/apipie/markup.rb:8:in `initialize'
	from /home/xhire/.gem/ruby/2.2.0/gems/apipie-rails-0.5.1/lib/apipie/configuration.rb:139:in `new'
	from /home/xhire/.gem/ruby/2.2.0/gems/apipie-rails-0.5.1/lib/apipie/configuration.rb:139:in `initialize'
	from /home/xhire/.gem/ruby/2.2.0/gems/apipie-rails-0.5.1/lib/apipie/apipie_module.rb:26:in `new'
	from /home/xhire/.gem/ruby/2.2.0/gems/apipie-rails-0.5.1/lib/apipie/apipie_module.rb:26:in `configuration'
	from /home/xhire/.gem/ruby/2.2.0/gems/apipie-rails-0.5.1/lib/apipie/apipie_module.rb:22:in `configure'
	from /home/xhire/devel/web/apipie-test/config/initializers/apipie.rb:1:in `<top (required)>'

The initializer is irrelevant since I can comment it out and the exception would come from config/routes.rb instead. But for the sake of completeness:

Apipie.configure do |config|
  config.markup = Apipie::Markup::Markdown.new
end

If I comment out the line apipie-rails-0.5.1/lib/apipie/configuration.rb:139, everything is fine again. From what I can see, the code first sets default values and then lets the block change them. Either this should be reversed or the set markup should be instantiated later when everything is already set up or the class Configuration could have a reader method for @markup that would handle the default (or something else :c)).

vkrizan added a commit to vkrizan/apipie-rails that referenced this issue May 20, 2020
Lazyloads rdoc for the defualt `Apipie::Markup::RDoc` to prevent errors on
require: `cannot load such file -- rdoc (LoadError)`.
@vkrizan
Copy link
Contributor

vkrizan commented May 20, 2020

I guess this can be also resolved by changing the documentation.

vkrizan added a commit to vkrizan/foreman that referenced this issue May 20, 2020
apipie-rails has rdoc optional, however, its default markup generator is
RDoc.  rdoc seems to be found on most of the default OS installations
through inclusion from rubygems.

This fixes (development) setup when rdoc is missing:

```
`require': cannot load such file -- rdoc (LoadError)
```

Technically, the apipie-rails should not fail with default configuraton
when an optional dependency is not installed:
Apipie/apipie-rails#544
vkrizan added a commit to vkrizan/foreman that referenced this issue May 20, 2020
apipie-rails has rdoc optional, however, its default markup generator is
RDoc.  rdoc seems to be found on most of the default OS installations
through inclusion from rubygems.

This fixes (development) setup when rdoc is missing:

```
`require': cannot load such file -- rdoc (LoadError)
```

Technically, the apipie-rails should not fail with default configuraton
when an optional dependency is not installed:
Apipie/apipie-rails#544
ofedoren pushed a commit that referenced this issue May 20, 2020
Lazyloads rdoc for the defualt `Apipie::Markup::RDoc` to prevent errors on
require: `cannot load such file -- rdoc (LoadError)`.
tbrisker pushed a commit to theforeman/foreman that referenced this issue May 21, 2020
apipie-rails has rdoc optional, however, its default markup generator is
RDoc.  rdoc seems to be found on most of the default OS installations
through inclusion from rubygems.

This fixes (development) setup when rdoc is missing:

```
`require': cannot load such file -- rdoc (LoadError)
```

Technically, the apipie-rails should not fail with default configuraton
when an optional dependency is not installed:
Apipie/apipie-rails#544
yoav-p6 pushed a commit to parallel-6/apipie-rails that referenced this issue Nov 6, 2020
Lazyloads rdoc for the defualt `Apipie::Markup::RDoc` to prevent errors on
require: `cannot load such file -- rdoc (LoadError)`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants