You can't use 'therubyracer' and 'libv8' gems with JRuby.
Short answer:
Use 'therubyrhino' gem instead (https://github.com/cowboyd/therubyrhino)
Explanation:
There are some gems that can't be used under JRuby, because they are using native (C) extensions - here is a list: https://github.com/jruby/jruby/wiki/C-Extension-Alternatives