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

Gem version 0.1.8 doesn't work with Ruby 1.8.7 #28

Closed
thesp0nge opened this issue Mar 6, 2013 · 4 comments
Closed

Gem version 0.1.8 doesn't work with Ruby 1.8.7 #28

thesp0nge opened this issue Mar 6, 2013 · 4 comments

Comments

@thesp0nge
Copy link

Hi there, unfortunately it seems Nexpose Gem has a syntax that doesn't work with Ruby 1.8.7.

/Users/thesp0nge/.rvm/gems/ruby-1.8.7-p358-i386@engage/gems/nexpose-0.1.8/lib/nexpose.rb:67:in `require': /Users/thesp0nge/.rvm/gems/ruby-1.8.7-p358-i386@engage/gems/nexpose-0.1.8/lib/nexpose/site.rb:94: syntax error, unexpected '.', expecting kEND (SyntaxError)
                                .max_by { |scan| scan.end_time }
                                 ^
    from /Users/thesp0nge/.rvm/gems/ruby-1.8.7-p358-i386@engage/gems/nexpose-0.1.8/lib/nexpose.rb:67
    from /Users/thesp0nge/.rvm/gems/ruby-1.8.7-p358-i386@global/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in `require'
    from /Users/thesp0nge/.rvm/gems/ruby-1.8.7-p358-i386@global/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in `require'
    from /Users/thesp0nge/.rvm/gems/ruby-1.8.7-p358-i386@global/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:in `each'
    from /Users/thesp0nge/.rvm/gems/ruby-1.8.7-p358-i386@global/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:in `require'
    from /Users/thesp0nge/.rvm/gems/ruby-1.8.7-p358-i386@global/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in `each'
    from /Users/thesp0nge/.rvm/gems/ruby-1.8.7-p358-i386@global/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in `require'
    from /Users/thesp0nge/.rvm/gems/ruby-1.8.7-p358-i386@global/gems/bundler-1.1.5/lib/bundler.rb:119:in `require'
    from /Users/thesp0nge/.rvm/gems/ruby-1.8.7-p358-i386@global/gems/bundler-1.1.5/lib/bundler/cli.rb:493:in `console'
    from /Users/thesp0nge/.rvm/gems/ruby-1.8.7-p358-i386@global/gems/bundler-1.1.5/lib/bundler/vendor/thor/task.rb:22:in `send'
    from /Users/thesp0nge/.rvm/gems/ruby-1.8.7-p358-i386@global/gems/bundler-1.1.5/lib/bundler/vendor/thor/task.rb:22:in `run'
    from /Users/thesp0nge/.rvm/gems/ruby-1.8.7-p358-i386@global/gems/bundler-1.1.5/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
    from /Users/thesp0nge/.rvm/gems/ruby-1.8.7-p358-i386@global/gems/bundler-1.1.5/lib/bundler/vendor/thor.rb:263:in `dispatch'
    from /Users/thesp0nge/.rvm/gems/ruby-1.8.7-p358-i386@global/gems/bundler-1.1.5/lib/bundler/vendor/thor/base.rb:386:in `start'
    from /Users/thesp0nge/.rvm/gems/ruby-1.8.7-p358-i386@global/gems/bundler-1.1.5/bin/bundle:13
    from /Users/thesp0nge/.rvm/gems/ruby-1.8.7-p358-i386@global/bin/bundle:23:in `load'
    from /Users/thesp0nge/.rvm/gems/ruby-1.8.7-p358-i386@global/bin/bundle:23

Using Ruby 1.9.3 with the same Gemset, the code works

@mdaines-r7
Copy link
Contributor

Wow, what a method to be tripped up by!

My inclination is to just alter the gemspec to require 1.9.3 (or 1.9.1?). With the release of Ruby 2.0, I'm not sure it makes sense to maintain backward compatibility with 1.8.7. I think I'd have to do quite a bit of testing before I was confident that, even with some modifications, the current gem would be 1.8.7 compatible, since I haven't run against 1.8.7 in probably 6 months or so.

@trosen-r7
Copy link

Support for 1.8.7 will be end-of-lifed in all R7 products w/ Ruby support in June 2013. This is when the Ruby team will cease official support of the Ruby 1.8.7 line.

http://www.ruby-lang.org/en/news/2011/10/06/plans-for-1-8-7/

Trevor Rosen
Engineering Manager – Metasploit Products

Email: trevor_rosen@rapid7.com
Website: http://www.rapid7.comhttp://www.rapid7.com/
Community: https://community.rapid7.cohttps://community.rapid7.com/m

From: mdaines-r7 <notifications@github.commailto:notifications@github.com>
Reply-To: rapid7/nexpose-client <reply@reply.github.commailto:reply@reply.github.com>
Date: Wednesday, March 6, 2013 10:11 AM
To: rapid7/nexpose-client <nexpose-client@noreply.github.commailto:nexpose-client@noreply.github.com>
Subject: Re: [nexpose-client] Gem version 0.1.8 doesn't work with Ruby 1.8.7 (#28)

Wow, what a method to be tripped up by!

My inclination is to just alter the gemspec to require 1.9.3 (or 1.9.1?). With the release of Ruby 2.0, I'm not sure it makes sense to maintain backward compatibility with 1.8.7. I think I'd have to do quite a bit of testing before I was confident that, even with some modifications, the current gem would be 1.8.7 compatible, since I haven't run against 1.8.7 in probably 6 months or so.


Reply to this email directly or view it on GitHubhttps://github.com//issues/28#issuecomment-14507681.
This electronic message contains information which may be confidential or privileged. The information is intended for the use of the individual or entity named above. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this electronic transmission in error, please notify us by e-mail at (postmaster@rapid7.com) immediately.

@mdaines-r7
Copy link
Contributor

OK, I'll dig into what it will take to return to 1.8.7 compliance. I'm currently confused, since I see the max_by method in the 1.8.7 documentation. I'll try to go through it in the next day or so and release a 0.1.9 that is 1.8.7 compliant.

@mdaines-r7
Copy link
Contributor

Turns out the problem was in wrapping on chained collection methods. 1.9 allows them to be on separate lines, but 1.8.7 requires that they are all on a single line.

In any case, I've pushed 0.1.9, which should return us to 1.8.7 compatibility.

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

No branches or pull requests

3 participants