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

Deprecation Warning: Mime::XLSX to Mime[:xlsx] #82

Closed
vitorvidotto opened this issue May 24, 2017 · 7 comments
Closed

Deprecation Warning: Mime::XLSX to Mime[:xlsx] #82

vitorvidotto opened this issue May 24, 2017 · 7 comments

Comments

@vitorvidotto
Copy link

When building xlsx, I am receiving this message:

DEPRECATION WARNING: Accessing mime types via constants is deprecated. Please change 'Mime::XLSX' to 'Mime[:xlsx]'

Should the gem be updated to this new syntax?

I am using rails 5.0.1, and ruby 2.2.5

@straydogstudio
Copy link
Collaborator

Thanks @Hugosirq. I'll get to that in the next release. Do you happen to know when it will be removed?

@straydogstudio
Copy link
Collaborator

@Hugosirq I fixed it everywhere but in one spot. Didn't get picked up in my testing I guess. And, on further research, the "new" syntax has been around forever. So I don't need to detect the rails version. I should look more closely next time. Thanks again for the heads up.

@straydogstudio
Copy link
Collaborator

Original Rails pull request: rails/rails#21869

@straydogstudio
Copy link
Collaborator

5.1 has removed access through constants.

@straydogstudio
Copy link
Collaborator

@Hugosirq Which axlsx_rails version are you using?

@vitorvidotto
Copy link
Author

vitorvidotto commented May 26, 2017

Hmmm, looking at my gem file list, it appears:
axlsx (2.1.0.pre, 2.0.1)
axlsx_rails (0.5.1, 0.3.0)

Now, looking at my .lock, for some reason bundler installed(or it is using) 0.3.0 .
ASAP I will try forcing with 0.5.1 version and see if it works.

@straydogstudio
Copy link
Collaborator

That would explain the deprecation. I'm glad to get rid of the conditionals in the code, however. And I'm now setting up automated testing for 5.1.

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

2 participants