« Return to Thread: Cannot run freetts libraries in NB 6.5 (Using Java Libraries in Rails Application tutorial)

Re: Cannot run freetts libraries in NB 6.5 (Using Java Libraries in Rails Application tutorial)

by ckutler :: Rate this Message:

Reply to Author | View in Thread

Hi Jeff,

I just ran through this tutorial and I did not run into the problem that you show (see below).

However, I ran into another problem. The first time I ran it, I got this error:

uninitialized constant PostsController::VoiceManager

I don't know why that happened because I have to following at the top of the posts_controller.rb file:

include Java
import com.sun.speech.freetts.Voice
import com.sun.speech.freetts.VoiceManager


To make the program work, I edited the call to VoiceManager to qualify the class. That is, I changed it from

voice = VoiceManager.instance.get_voice('kevin16')

to

voice = com.sun.speech.freetts.VoiceManager.instance.get_voice('kevin16')

I do not know why I needed to do this. As far as I know, I should not have to.

I am using Windows XP, NetBeans 6.5 with the built in JRuby (1.1.4) and the WEBrick server. Java Version is 1.6.0_10.


Jeff Rubinoff wrote:
I've been trying the NB 6.1 Using Java Libraries in Rails Application tutorial, at http://www.netbeans.org/kb/61/ruby/java-ruby.html. When I run the project, I get a java.lang.OutOfMemoryError: Java heap space. Output attached. speak.htm My guess is that there is something about either my JDK (6_u11) or the Ruby/JRuby version that doesn't play nicely with freetts, which is from 2005 after all. I've double-checked that all my alterations to the rubyweblog project were identical with the tutorial, and they are. Has anyone got any idea what is wrong?

jeff

 « Return to Thread: Cannot run freetts libraries in NB 6.5 (Using Java Libraries in Rails Application tutorial)