Ruby: require 'randomsecure' - Problem

For general discussion related FlowStone
Post Reply
User avatar
tiffy
Posts: 400
Joined: Wed May 08, 2013 12:14 pm

Ruby: require 'randomsecure' - Problem

Post by tiffy »

When I run the Ruby “require 'randomsecure' “ instruction in the Flowstone Ruby interpreter it does what it is supposed to do, but when I export the code in the attached schematic as an *.exe file, then the *.exe file does not function at all. It appears then that the “ require ‘randomsecure’ “ instruction does not find the “randomsecure.rb” file only when the schematic is exported as an *.exe, but why? The *.fsm file and the *.exe exported file as well as the “randomsecure.rb” file (also attached for convenience only) all stays in the exact same folders, nothing changed. The code in the schematic is part of another larger schematic I am working on.
Attachments
Unique Random Code Generator.rar
(4.34 KiB) Downloaded 898 times
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Ruby: require 'randomsecure' - Problem

Post by tulamide »

I quote the user guide, chapter 8, section "Ruby Limitations", page 232:
Currently VST plugins generated by FlowStone cannot make use of Ruby extensions or Gems.


So, in order to use them in a VST, you'd need to place the code from SecureRandom (and all dependencies that are outsourced) in RubyEdits and take care that they are initialized in the correct order. They are then included in the exported dll and should work as any code you enter in RubyEdits.

Of course, that only works with extensions or Gems that are written in Ruby. Precompiled ones won't.
"There lies the dog buried" (German saying translated literally)
User avatar
tiffy
Posts: 400
Joined: Wed May 08, 2013 12:14 pm

Re: Ruby: require 'randomsecure' - Problem

Post by tiffy »

tulamide wrote:I quote the user guide, chapter 8, section "Ruby Limitations", page 232:
Currently VST plugins generated by FlowStone cannot make use of Ruby extensions or Gems.


Thanks again tulamide, I surely missed this one in the userguide.
Post Reply