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

Travis CI: TypeError: can't dup NilClass on Ruby <= 2.3 and rack-2.x cases #243

Closed
junaruga opened this issue Feb 11, 2019 · 6 comments · Fixed by #244
Closed

Travis CI: TypeError: can't dup NilClass on Ruby <= 2.3 and rack-2.x cases #243

junaruga opened this issue Feb 11, 2019 · 6 comments · Fixed by #244

Comments

@junaruga
Copy link
Contributor

I would open new ticket for the issue, originally comes from #240 (comment) .
This error happens below line.

/home/travis/.rvm/gems/ruby-2.3.6/gems/sinatra-2.0.5/lib/sinatra/base.rb:1092:in `dup'

A fact is the rack-test CI was passed with dependencies: rack 2.0.5 and sinatra 2.0.4 5 month ago.
https://travis-ci.org/rack-test/rack-test/jobs/432436824

I assume current latest version rack 2.0.6 or sinatra 2.0.5 changed the interface.

@junaruga
Copy link
Contributor Author

I found the reason of the issue.
sinatra 2.0.5 has the issue. And sinatra 2.0.4 does not have the issue.
And on the upstream, the issue was fixed by below commit. So, the next release of sinatra fixes the issue.
sinatra/sinatra@d8c1839

@junaruga
Copy link
Contributor Author

Ref sinatra/sinatra#1517

@junaruga junaruga mentioned this issue Feb 11, 2019
@dennissivia
Copy link

I suggest just using 2.0.4 for now so that we are not blocked. Once that is merged and the other fix is rolled out, we have a stable build again and then we do not need to rush the sinatra update and just do it after their update. Just my 2 cents.

@junaruga
Copy link
Contributor Author

@scepticulous I agree with you. Let's send the pull-request later.

@dennissivia
Copy link

dennissivia commented Feb 12, 2019

Actually I would prefer pinning the version to 2.0.4 for now.
Seems as if sinatra has a release every few month and I like having a green build and this should also make it nicer for people to contribute.
This way we can fix both existing issues this week and then we are green and we just open an issue to remove the version pinning in sinatra to not forget it.

Reasoning: Never be blocked in a broken state with something you have to "wait for".

What do you think @junaruga @perlun.

@junaruga
Copy link
Contributor Author

@scepticulous yes I agree with you. But I think pinning the sinatra version 2.0.4 is temporary until the 2.0.6 version will be released.
Because we want to reproduce a popular workflow to install rack-test as much as possible on CI, right?

jarmopi added a commit to puavo-org/puavo-web that referenced this issue Aug 22, 2019
There's a bug in Sinatra 2.0.5 that makes one REST test fail
(devices_write_test.rb) as it tries to dup a NilClass. See

rack/rack-test#243

for discussion.

The commit that fixes the error is

sinatra/sinatra@d8c1839

but, at the time of this commit, there have been no Sinatra releases
in almost nine months and the fix is not in any released version.
So downgrading is the only option.

EDIT: Just after making this commit, I noticed they released
a fixed version yesterday (2.0.6) and another fix (2.0.7) this
morning. I am not upgrading it yet.
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