You may have noticed when you’re running long-ish rails processes in windows that it sometimes pauses briefly, then continues on its merry way.
for posterity sake, here’s the stuff i removed from the wiki:
====Under OSX I get this error when trying to execute jruby: ”Exception in thread ‘main’ java.lang.NoClassDefFoundError: org/jruby/Main” ====The source of this problem is the inclusion of <tt>’.'</tt> (current directory) in your $PATH. You’re also trying to execute JRuby from <tt>$JRUBY_HOME/bin</tt>. There’s a bug in the JRuby bash script that prevents this from working.
To correct the issue, remove <tt>’.'</tt> from your $PATH and relaunch the shell. Alternately, if you really want to keep <tt>’.'</tt> in your $PATH (which you shouldn’t, but see google for reasons why), then just change your working directory to something other than <tt>$JRUBY_HOME/bin</tt> and execute the <tt>jruby</tt> command. It should launch just fine. % cd /any/path/other/than/jruby_home % jruby # should work
”’Note:”” This bug has been fixed in JRuby 1.2.
Appears that you load your image, then create a new other image (BufferedImage, we’ll call it), paint your first image onto that, then add the text onto the top of that.
you may be needing to wait for the image to load before you can use it to paint your graphics2d with it
this means “the default color is black–or possibly just random garbage — paint over it”
Here it is:
Here’s how to combine two images into one (a “collage”)
require ‘rubygems’require ‘RMagick’include Magick
image_name = ‘johnpack1.jpg’
image_1 = Image.read(image_name).firstimage_2 = Image.read(image_name).first
image_1.composite!(image_2, 1 * 100 + rand(15), 150 + rand(15), OverCompositeOp)image_1.write(‘collage.jpg’)
CC liblua_plugin_la-net.lolibs/net.c: In function ‘vlclua_fd_write’:libs/net.c:249:5: error: implicit declaration of function ‘write’libs/net.c: In function ‘vlclua_fd_read’:libs/net.c:259:5: error: implicit declaration of function ‘read’make: *** [liblua_plugin_la-net.lo] Error 1make: Leaving directory `/c/dev/ruby/downloads/juhovh_vlc/modules/misc/lua’make: *** [all] Error 2make: Leaving directory `/c/dev/ruby/downloads/juhovh_vlc/modules/misc/lua’make: *** [all-recursive] Error 1make: Leaving directory `/c/dev/ruby/downloads/juhovh_vlc/modules/misc’make: *** [all] Error 2make: Leaving directory `/c/dev/ruby/downloads/juhovh_vlc/modules/misc’make: *** [all-recursive] Error 1make: Leaving directory `/c/dev/ruby/downloads/juhovh_vlc/modules’make: *** [all-recursive] Error 1make: Leaving directory `/c/dev/ruby/downloads/juhovh_vlc’make: *** [all] Error 2
meant “disable lua–something is not quite right in there [mingw videolan]“