-
Notifications
You must be signed in to change notification settings - Fork 75
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
Remote server (heroku) crashes when loading xirr gem #10
Comments
You must be running on the new Heroku stack, right? It does not allow the
The work around is to your the old stack. Or use the no-inline branch. Try it to see if your results are fast enough. |
How can I get the old stack on Heroku with C support? I would like to continue having the same speed, which is wonderful. Sorry, I'm a total noob at this. |
Thanks for your help first of all. |
@marcusteam5 could you go around that problem ? |
@fmoudoute one work around is to use the no_inline branch. I think it will work on newer Heroku stacks. |
no_inline branch on Heroku Stack 18 worked for me. Thank you. |
Confirmed issue on Heroku-18:
Resolution was to use the |
Unfortunately using # frozen_string_literal: true
module Xirr
module Base
alias_method :original_xnpv_c, :xnpv_c
def xnpv_c(rate, amount, period)
return original_xnpv_c(rate, amount, period) unless Rails.env.production?
`xirr #{rate} #{amount} #{period}`.to_f
end
end
end Hope this can help developers facing the same issue. |
First of all great gem! Love how flawless this runs on my machine. The calculation seem even more smooth than excels calculation of xirr.
I have troubles deploying it to heroku however. It runs smoothly in my local environment on Ruby 2.4.1. The server at Heroku however crashes when trying to load this gem.
Heroku is not the first host to fail at this. I had it on a vps server at a2hosting.com, which also crashed and wasn't able to load the gem. Once I disabled it my app was fine. So I am pretty sure it is not due to the specific environment of heroku. Without this gem my app runs remotely.
I would really like to use this gem, also remotely, please help! Thanks.
Here are the logs: (Please note that the crash happens at 2018-10-04T14:00:58.317322+00:00 heroku[web.1]: )
The text was updated successfully, but these errors were encountered: