Why is this happening? if i put my Rjb::load method in environment.rb webrick won''t start from inside radrails it just sits there trying to connect.. however i can start webrick manually by doing script/server in a terminal window. i saw some code where instead of having the load method in environment.rb they put it in the model that uses it.. decided to try this, but when i put it in there either inside a ''connect'' class method or just floating inside the body of the class i get the error ''can''t create Java VM''.. where does the Rjb::load method go? i left the require in environment.rb (but i did try moving it out of desperation trying to get things to work).. any help would be majorly appreciated --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I would suggest take this to a JRuby forum. I would guess most people here are not running Ruby inside the JVM. I could be wrong. I just imagine you''ll get better help from the JRuby guys. On May 1, 10:36 am, stewbawka <stewba...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Why is this happening? > if i put my Rjb::load method in environment.rb webrick won''t start > from inside radrails it just sits there trying to connect.. however i > can start webrick manually by doing script/server in a terminal > window. > > i saw some code where instead of having the load method in > environment.rb they put it in the model that uses it.. decided to try > this, but when i put it in there either inside a ''connect'' class > method or just floating inside the body of the class i get the error > ''can''t create Java VM''.. > > where does the Rjb::load method go? i left the require in > environment.rb (but i did try moving it out of desperation trying to > get things to work).. > > any help would be majorly appreciated--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I ran into a similar problem in Windows. It doesn''t detect the JAVA_HOME environment variable. I added the following above the Rjb::load line: ENV[''JAVA_HOME''] = ''C:\Program Files\Java\jdk1.6.0'' if ENV[''JAVA_HOME''].nil? - Stephen -----Original Message----- From: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] On Behalf Of Robert Walker Sent: Tuesday, May 01, 2007 11:46 To: Ruby on Rails: Talk Subject: [Rails] Re: RJB jave bridge help! I would suggest take this to a JRuby forum. I would guess most people here are not running Ruby inside the JVM. I could be wrong. I just imagine you''ll get better help from the JRuby guys. On May 1, 10:36 am, stewbawka <stewba...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Why is this happening? > if i put my Rjb::load method in environment.rb webrick won''t start > from inside radrails it just sits there trying to connect.. however i > can start webrick manually by doing script/server in a terminal > window. > > i saw some code where instead of having the load method in > environment.rb they put it in the model that uses it.. decided to try > this, but when i put it in there either inside a ''connect'' class > method or just floating inside the body of the class i get the error > ''can''t create Java VM''.. > > where does the Rjb::load method go? i left the require in > environment.rb (but i did try moving it out of desperation trying to > get things to work).. > > any help would be majorly appreciatedNo virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.2/782 - Release Date: 5/1/2007 02:10 No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.2/782 - Release Date: 5/1/2007 02:10 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ahhhh! yes the JAVA_HOME wasn''t getting passed on! thank you so much.. i''m not on windows, but the ENV[''JAVA_HOME''] check failed so i did like you suggested (but with linux path). funny thing is that it would work fine when i did script/server in the terminal, but trying to start the server in radrails kept giving me the ''can''t start Java VM''.. thanks a bunch.. On May 1, 1:42 pm, "Stephen Gerstacker" <sgerstac...-qOfIXkuI2Z3elmxzKc6BS1aTQe2KTcn/@public.gmane.org> wrote:> I ran into a similar problem in Windows. It doesn''t detect the JAVA_HOME > environment variable. I added the following above the Rjb::load line: > > ENV[''JAVA_HOME''] = ''C:\Program Files\Java\jdk1.6.0'' if > ENV[''JAVA_HOME''].nil? > > - Stephen >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---