Question About Gems And DataBase's?

Hello IM working on a Rails app That requires the midilib gem I have
installed the gem using gemsonrails and installation went great but i
was wondering where in my Application do i call the Gem At in my
application controller or the controller the uses the Gem? Also As Iam
Using the Midilib gem I want to be able to create a midi file and
store it in my Mysql Database…

The bases of my App is that is takes a A Text field and then converts
it into A Midi file

I have created the midi converter in Ruby and its whole conversion is
based around a tomidi method that i have created and now want to use
that same Method in my rails app

Thanks for any help


Place your midi converter on the lib folder or make it a plugin. Then
you can use your library from anywhere on your app. By the way, I
suggest you create a daemon that will check pending conversions,
depending on how long a conversion takes. If you do the conversion
directly on a controller, it can collapse your application.
I don’t know midilib, but I don’t recomend storing files on MySQL, I
would only store the path to the file, but you can check the BLOB
field, I’ve never used it on MySQL, only in Oracle and worked fine.



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs