Installing Rails on a JRuby workspace gives OutOfMemoryError

I checked out/built the JRuby workspace and installing Rails is
giving the following error:

C:\workspaces\jruby-trunk>bin\jruby -S gem install rails
–include-dependencies --no-ri --no-rdoc
Bulk updating Gem source index for: http://gems.rubyforge.org
Exception in thread “main” java.lang.OutOfMemoryError: Java heap space
at org.jruby.util.ByteList.grow(ByteList.java:535)
at org.jruby.util.ByteList.append(ByteList.java:116)
at org.jruby.util.ByteList.append(ByteList.java:122)
at org.jvyamlb.ScannerImpl.update(ScannerImpl.java:330)
at org.jvyamlb.ScannerImpl.ensure(ScannerImpl.java:350)
at org.jvyamlb.ScannerImpl.scanLineBreak(ScannerImpl.java:581)
at
org.jvyamlb.ScannerImpl.scanToNextToken(ScannerImpl.java:562)
at
org.jvyamlb.ScannerImpl.fetchMoreTokens(ScannerImpl.java:488)
at org.jvyamlb.ScannerImpl.peekToken(ScannerImpl.java:411)

I fixed it by specifying the switch “-J-Xmx384M”. So the command that
works is:

bin\jruby -J-Xmx512M -S gem install rails --include-dependencies --no-ri
–no-rdoc

-Arun

Web Technologies and Standards
Sun Microsystems, Inc.
Blog: http://blogs.sun.com/arungupta


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email