Most bundle commands broken after upgrade to Mac 10.9 (using Ruby 2.0 by default)
peta opened this issue · comments
A user reported me, that the bundle doesn't any longer work for him after upgrading to Mac OS 10.9 which is now shipped with MRI 2.0 as default Ruby interpreter. I wasn't aware of this, because I decided not to upgrade to 10.9 in the near future. I will investigate on this an come up with a fix anytime soon. +1 this issue if you think it's very urgent.
There might be a "quick fix" for this by changing the first line of the Ruby scripts for the following
#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
which invoke the Ruby 1.8 interpreter...
But there might be other dependencies...
I just commited a fix to the dev
branch. @lapalme, would you mind to test if it also works for your scenario? Just download the whole repository as zip, and move its content into ~/Library/Application\ Support/TextMate/Managed/Bundles/Turtle.tmbundle
overwriting everything else inside it.
Peter
Le 2014-01-17 à 09:18, Peter Geil notifications@github.com a écrit :
I just commited a fix to the dev branch. @lapalme, would you mind to test if it also works for your scenario? Just download the whole repository as zip, and move its content into ~/Library/Application\ Support/TextMate/Managed/Bundles/Turtle.tmbundle overwriting everything else already inside it.
I installed it and it seems to work, but I will try more complex things soon and come back to you.
thanks for following that
Guy
@lapalme Some more experience in the meantime?
Peter
@lapalme Some more experience in the meantime?
I was just thinking of sending more information because I recently took some time to try it.
Most of the editing, validation and even exporting visualisation commands work but the "remove unused @Prefix directive" does not seem to do anything.
But when I try, "documentation for resource", "convert to format" or "execute SPARQL query" I get an error panel containing:
- Some warnings, that might be easy to remove
/Users/lapalme/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/ui.rb:129: warning: assigned but unused variable - pid
Convert to format:40:in `
': warning: URI.escape is obsolete/Users/lapalme/Library/Application Support/TextMate/Managed/Bundles/Bundle
ruby: warning: -K is specified; it is for 1.8 compatibility and may cause odd behavior
Documentation for Resource:8: warning: assigned but unused variable - scope
/Users/lapalme/Library/Application Support/TextMate/Managed/Bundles/Turtle.tmbundle/Support/lib/turtle.rb:195: warning: character class has duplicated range: /[^\w\s_-]+/
But this one is harder...
Support.tmbundle/Support/shared/lib/ui.rb:355:in to_plist': An object in the argument tree could not be converted (ArgumentError) from /Users/lapalme/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/ui.rb:355:in
request_string_core'
from /Users/lapalme/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/ui.rb:193:in request_string' from Convert to format:52:in
which also occurs with (when called by "documentation for resource"):
to_plist': An object in the argument tree could not be converted (ArgumentError) from /Users/lapalme/Library/Application Support/TextMate/Managed/Bundles/Turtle.tmbundle/Support/lib/turtle.rb:61:in
module:Turtle'
from /Users/lapalme/Library/Application Support/TextMate/Managed/Bundles/Turtle.tmbundle/Support/lib/turtle.rb:13:in <top (required)>' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in
require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in require' from Documentation for Resource:5:in
It seems that you call an external program, you need to transform arguments to a "Mac style plist" and that special Ruby command is not provided anymore by default.
Another small detail:
Note that both "Execute SPARQL" and "Visualize knowledge base" are mapped to Command-R.
I hope this can be of some help
thanks in advance
Guy
@lapalme Good news, problem seems to be solved. I tested it yesterday with a staff member from Textmate and everything worked (again).
The updated version (along with some additional improvements/features) is now available through the official bundle repository. IMPORTANT: To make sure TM loads the version installed via the bundle installer, we have to delete all previous artifacts. To do this:
- open bundle installer dialog, uncheck/uninstall Turtle bundle
- Go to
~/Library/Application Support/Avian/Bundles
and delete the file/folderTurtle.tmBundle
if it exists - open bundle installer dialog, check/install Turtle bundle again
And now please tell me that I can close this issue ;-)
Peter
@lapalme Good news, problem seems to be solved. I tested it yesterday with a staff member from Textmate and everything worked (again). The "official" way to deal with the Ruby 1.8/2.0 issue is to stick with the absolute path to the 1.8.7 interpreter in the shebang line. Pretty simple, I know. :)
this is an improvement but I never managed to "run a query" at SPAEQL endpoint (I only tried dbpedia.org). See the enclosed screendump, in which I show the query on the "original" dbpedia.org (where it works) and the output I get when I run it from TextMate.
You will also see that the start of the output is hidden behind the header...
Please note also that because CMD-R is bound to both - Execute SPARQL and Visualize Knowledge base, we have to run it from the Menu. I suggest that "Visualize" be bound to something else.
The command "remove unused @Prefix" does not seem to do anything.
thanks
Guy