Page 1 of 1
REQ: Copy/Export Ruby error messages
Posted: Fri Apr 19, 2013 5:17 pm
by Drnkhobo
Dear Support!
So you know when your Ruby module displays an error via the little debug screen at the bottom. . ?
Well, can we have an option to right click or something & it copies the error text to clipboard or maybe exports it?
I think it will be a nice little addon that will help us & shouldnt be too difficult for you FS devs
Thanks guys!
Re: REQ: Copy/Export Ruby error messages
Posted: Fri Apr 19, 2013 5:38 pm
by Drnkhobo
Should have explained i am having some trouble with Ruby & libraries.
I am trying to parse an url but I get stopped before I can even connect.
You see I am going for Ruby's built in uri library.
So i found the uri.rb file & its dependent folder, my ruby code looks like this:
Ruby's error log shows
Code: Select all
NameError: uninitialized constant Encoding::UTF_7
Now tried to do some searching & most of the mighty googles results are very contextual. So no good for me...
What i can gather is that an uninit constant means im not using a constant in my code...right?
what i want to do is:
Code: Select all
puts open('http:://www.wikipedia.com').read(200)
So i never declare any Encoding & isnt "::" a reference to a class or module???
Re: REQ: Copy/Export Ruby error messages
Posted: Fri Apr 19, 2013 5:59 pm
by Drnkhobo
Trying with Net/Http library but it appears the socket.so file that it requires is not compatible with FS's version of Ruby

Re: REQ: Copy/Export Ruby error messages
Posted: Sat Apr 20, 2013 8:20 pm
by trogluddite
Drnkhobo wrote:What i can gather is that an uninit constant means im not using a constant in my code...right?
It most likely means that the library you want to use is dependent upon one or more of the other 'standard' libraries. Without those libraries, the supported encodings are very limited - and the constants that name the other encoding types will be missing; hence the error.
Drnkhobo wrote:Trying with Net/Http library but it appears the socket.so file that it requires is not compatible with FS's version of Ruby
Lots of .so files are unlikely to work with FS - .so files are Ruby libraries compiled from C (to make them much faster), but they will only work if they were compiled using the same compiler which FS was built with; and sadly, most of them aren't.
I'm really hoping that this can be sorted out so that we can have access to the 'standard' libraries - I keep seeing examples of really useful looking Ruby code that we just can't use at the moment.