[rjb-users] Rjb on Rails: Can't Create Java VM
rjb-users at rubyforge.org
rjb-users at rubyforge.org
Mon Oct 22 19:34:04 EDT 2007
Jason,
thanks for the adivse because you are right for setting the environment
variable in your shell.
For security reason, one must set LD_LIBRARY_PATH prior to load the
program (for example ruby, in this case) that loads the libraris from
the path. (JAVA_HOME and CLASSPATH are safe to set in the process, so
your environment.rb is meaningful for them)
On Mon, 22 Oct 2007 18:44:48 -0400
rjb-users at rubyforge.orgさん wrote:
> > I put this in my environment.rb (consistent with what is defined in my
> > bash environment) as is advised in http://rjb.rubyforge.org/:
> >
> > JAVA_HOME = '/usr/lib/j2sdk1.5-sun'
> > LD_LIBRARY_PATH
> > ='/usr/lib/j2sdk1.5-sun:/usr/lib/j2sdk1.5-sun/jre/lib/i386:/usr/lib/j2sdk1.5-sun/jre/lib/i386/client'
> > CLASSPATH='/opt/cf/lib/saxon8.jar'
> >
> > Error I receive is:
> > RuntimeError: can't create Java VM
>
> I had a similar problem awhile back. I remember I diagnosed the
> problem and found it wouldn't work for some reason or another. I just
> can't remember why. I need Google for my brain.
>
> Anyways, I fixed it by adding a shell script that exported those
> variables and called mongrel. I also edited the mongrel_cluster
> init.d file to do the same. I blogged about it, scroll down to the
> "Caveats" part.
>
> http://www.peabrane.com/2007/3/5/pdf-templates-via-rails
>
> Hope that helps.
>
> --
> Jason Yates
> jaywhy at gmail.com
> _______________________________________________
> rjb-users mailing list
> rjb-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rjb-users
--
arton
More information about the rjb-users
mailing list