I’m trying to integrate ternjs [0] into Textmate and am running into problems:
* if I use #!/usr/bin/env ruby18 -wKU I can’t
require(‘json’)
in my script, it gives me a loadError
* if I use #!/usr/bin/env ruby
then the lib/ui.rb message dialog won’t work because it utilises an old osx-plist function [1]. I even managed to recompile the old plist thing and made it work, but it won’t work when forked [2] with an error
dyld: lazy symbol binding failed: Symbol not found: _rb_gc_writebarrier_unprotect Expected in: flat namespace
Can anyone give me pointers into a direction? Textmate Bundle development is so frustrating :(
Thanks Fabian
[0] ternjs.net/doc/manual.html [1] https://stackoverflow.com/questions/6869463/in-textmate-i-cant-create-partia... [2] https://github.com/textmate/bundle-support.tmbundle/blob/master/Support/shar...
On 2016-03-29 09:42, Fabian Zeindl wrote:
I’m trying to integrate ternjs [0] into Textmate and am running into problems:
- if I use #!/usr/bin/env ruby18 -wKU I can’t
require(‘json’)
in my script, it gives me a loadError
There's no 'json' module in Ruby 1.8.7, it first appeared in 1.9.2 (as far as I can see). The easiest would probably be to copy the JSON gem into your bundle.
On 29.03.2016, at 16:53 , Jacob Carlborg doob@me.com wrote:
There's no 'json' module in Ruby 1.8.7, it first appeared in 1.9.2 (as far as I can see). The easiest would probably be to copy the JSON gem into your bundle.
I’ve been trying this for 2 hours now and can’t get it to work. I copied json-1.8.3 gem into my Support directory and adde:
require ENV['TM_BUNDLE_SUPPORT'] + '/json-1.8.3/lib/json/json.rb’
which gives me a LoadError about the next relatively required file. (lib/json/common.rb)
Any pointers would be much appreciated, I really want to make javascript auto complete work for textmate.
Thanks! Fabian
On 2016-03-30 16:30, Fabian Zeindl wrote:
I’ve been trying this for 2 hours now and can’t get it to work. I copied json-1.8.3 gem into my Support directory and adde:
require ENV['TM_BUNDLE_SUPPORT'] + '/json-1.8.3/lib/json/json.rb’
which gives me a LoadError about the next relatively required file. (lib/json/common.rb)
Try adding ENV['TM_BUNDLE_SUPPORT'] + '/json-1.8.3/lib to the Ruby load path. Then "require 'json'" as usual.
BTW, since this gem contains native code you need tot make sure that the native code is compiled.
On 30.03.2016, at 16:57 , Jacob Carlborg doob@me.com wrote:
Try adding ENV['TM_BUNDLE_SUPPORT'] + '/json-1.8.3/lib to the Ruby load path. Then "require 'json'" as usual.
BTW, since this gem contains native code you need tot make sure that the native code is compiled.
Awesome, made it work, now it just needs some polish. Native Code is not needed since the gem includes a pure-ruby version.
Thanks! Fabian
It would be lovely to have something like this in LaTeX too.
P
On 31 Mar 2016, at 11:02 am, Fabian Zeindl fabian.zeindl@gmail.com wrote:
On 30.03.2016, at 16:57 , Jacob Carlborg doob@me.com wrote:
Try adding ENV['TM_BUNDLE_SUPPORT'] + '/json-1.8.3/lib to the Ruby load path. Then "require 'json'" as usual.
BTW, since this gem contains native code you need tot make sure that the native code is compiled.
Awesome, made it work, now it just needs some polish. Native Code is not needed since the gem includes a pure-ruby version.
<Screen Shot 2016-03-31 at 12.01.01 .png>
Thanks! Fabian
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate