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

Allow use of ruby-head (Ruby 2.5.0-dev) #65

Merged
merged 1 commit into from
Aug 7, 2017

Conversation

koic
Copy link
Contributor

@koic koic commented Jan 2, 2017

Thanks for the release of pry-doc 0.10.0.

So here goes the main topic.
I offen using ruby-head (currently Ruby 2.5.0-dev) with Rails.

The following change raises an exception Gem Load Error is: ruby/2.5.0 isn't supported by this pry-doc version when using ruby-head.

f2eb5f6#diff-a80fb2c425dee3addc62d4caf9a81bb2L16

Environments:

  • ruby 2.5.0dev (2017-01-02 trunk 57252) [x86_64-darwin13]
  • rails (5.0.1)
  • pry-doc (0.10.0)

Backtrace is below.

% bundle exec rails c
/Users/koic/.rbenv/versions/2.5.0-dev/lib/ruby/gems/2.5.0/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:51: warning: constant ::Fixnum is deprecated
/Users/koic/.rbenv/versions/2.5.0-dev/lib/ruby/gems/2.5.0/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:52: warning: constant ::Bignum is deprecated
/Users/koic/.rbenv/versions/2.5.0-dev/lib/ruby/gems/2.5.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:94:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'pry-doc'. (Bundler::GemRequireError)
Gem Load Error is: ruby/2.5.0 isn't supported by this pry-doc version
Backtrace for gem load error is:
/Users/koic/.rbenv/versions/2.5.0-dev/lib/ruby/gems/2.5.0/gems/pry-doc-0.10.0/lib/pry-doc.rb:10:in `load_yardoc'
/Users/koic/.rbenv/versions/2.5.0-dev/lib/ruby/gems/2.5.0/gems/pry-doc-0.10.0/lib/pry-doc.rb:20:in `<top (required)>'

Therefore, I cannot start Rails (rails c, rails s and so on) .

I'd like to use ruby-head what I can.

This PR will make changes behavior from exception to logging. That is the previous behavior.

How do you think about this change?

Thanks.

@kyrylo
Copy link
Member

kyrylo commented Jan 3, 2017

Why can't you stop depending on pry-doc?

@koic
Copy link
Contributor Author

koic commented Feb 26, 2017

I'm sorry for the delay in my response.

For example, when developing a Rails application, it is a case where a programmers using Ruby 2.4.0 and a programmers using Ruby 2.5.0-dev share the Gemfile. And the dependency on pry-doc is written in this Gemfile.
(The CI guarantees the Ruby version we want to match in the production environment. So we can use a free Ruby version locally.)

If possible, I don't want to write if condition of Ruby version in Gemfile. So I hope it will behave like a previous puts warning.

And I'd like to use the edge Ruby (2.5.0-dev) with Rails in the development environment for early detection of the problem in a Rails application.

@onk
Copy link

onk commented Aug 7, 2017

I also want to write pry-doc to Gemfile when using ruby 2.5.0-dev.
How about making it warn instead of raise?

@kyrylo
Copy link
Member

kyrylo commented Aug 7, 2017

That sounds reasonable. Thanks for the ping 👍

@kyrylo kyrylo merged commit a13c327 into pry:master Aug 7, 2017
@koic koic deleted the allow_use_of_ruby_2_5_0 branch August 7, 2017 15:24
@koic
Copy link
Contributor Author

koic commented Aug 7, 2017

Thank you, everyone!

@kyrylo
Copy link
Member

kyrylo commented Aug 7, 2017

Just pushed v0.11.0 with this change.

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 this pull request may close these issues.

None yet

3 participants