Question

I'm using the VPIM gem for rails to create vcards for users based on their profile information.

It all works fine on my local host, but when I deploy to Heroku, the app crashes.

I'm getting the error below in the heroku logs, which I assume is what is causing the app to crash...

/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require': /app/vendor/bundle/ruby/2.0.0/gems/vpim-0.695/lib/vpim/vcard.rb:678: invalid multibyte escape: /^\xFE\xFF/ (SyntaxError)
2013-10-27T15:52:14.211497+00:00 app[web.1]: invalid multibyte escape: /^\xFF\xFE/

Any idea on how to fix this issue?

Here's the gem I'm using and some possible solutions that I haven't been able to get working yet. It might be because of my level of understanding of ruby-on-rails.

Gem: github(dot)com/fraser/vpim-rails

Possible solutions: https://github.com/sam-github/vpim/issues/5

https://github.com/GetJobber/vpim-rails/commit/0c92b5d7f9b2f6a59bdeea3127dbb668072371cc

Any help will be much appreciated.

-Ethan

Was it helpful?

Solution

There is a quick fix for it. Open the following file
"/app/vendor/bundle/ruby/2.0.0/gems/vpim-0.695/lib/vpim/vcard.rb"
in text editor, and add the following line at the beginning of file.
"# encoding: ISO-8859-1"

This solved it for me.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top