PlaneShift
Support => Technical Help: IN GAME bugs (after loading world) => Topic started by: sunhear on June 14, 2014, 02:13:10 am
-
hi
i am trying to run the ruby script to convert svg in to XMls.
require 'planeshift_sketch_xml'
Dir.foreach('~/.PlaneShift/sketches') do |name|
sketch = PlaneShiftSketchXML.load_from(name)
sketch.add_text(sketch.width - 300, sketch.height - 50, 'signature')
sketch.save_to(name)
end
when i run it it gives me
irb(main):001:0> require 'planeshift_sketch_xml'
LoadError: cannot load such file -- planeshift_sketch_xml
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require'
from (irb):1
from C:/RailsInstaller/Ruby1.9.3/bin/irb:12:in `<main>'
<h('C:\Users\sunhear\AppData\Roaming\PlaneShift\sketches\oja_1.xml') do |name|
< PlaneShiftSketchXML.load_from(F:\Personial\planeshift\map\oja_rode_1.)
<dd_text(sketch.width - 300, sketch.height - 50, 'signature')
<ave_to(C:\users\sunhear\AppData\Roaming\PlaneShift\sketches\oja_1)
irb(main):006:1> end
SyntaxError: (irb):3: syntax error, unexpected $undefined
...aneShiftSketchXML.load_from(F:\Personial\planeshift\map\oja_...
... ^
(irb):5: syntax error, unexpected $undefined
sketch.save_to(C:\users\sunhear\AppData\Roaming\P...
^
from C:/RailsInstaller/Ruby1.9.3/bin/irb:12:in `<main>'
irb(main):007:0>
frist i am right in gessing where to subatute the paths of the file? can any help me run the script?
sunhear
-
in the path where you run this script, is there a file "planeshift_sketch_xml.rb" or is this supposed to be installed as a gem?
to run a ruby script, you can write something like that...
ruby path_to/my_script.rbthe path to the script may be a relative path or even just a filename, if the file is at the current path of your terminal.
under Windows it might complain that it doesn't find the command 'ruby', then you will have to enter the full path to the ruby executable. With ruby I have only experience on Linux systems.
-
can you enplane more?