This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.script.*; | |
import java.io.*; | |
import interfaces.*; | |
public class Driver { | |
public static void main(String[] args) throws ScriptException, FileNotFoundException, NoSuchMethodException { | |
ScriptEngineManager manager = new ScriptEngineManager(); | |
ScriptEngine engine = manager.getEngineByName("jruby"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.script.*; | |
import java.io.*; | |
public class Driver | |
{ | |
public static void main(String[] args) throws ScriptException, FileNotFoundException, NoSuchMethodException { | |
// Setup stuff.... | |
// Get the ScriptEngineManager | |
ScriptEngineManager manager = new ScriptEngineManager(); | |
// Get the JRuby engine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So, I'm setting up a new Ubuntu 10.04 server with nginx, RVM, Ruby-1.9.1, and Thin. | |
I got through installing nginx, RVM, ruby-1.9.1 without any problems. | |
Ruby-1.9.1 was installed using 'rvm install x'; | |
I don't have a system Ruby (Which is what I've been doing previously). | |
I've also set the default ruby to 1.9.1 for myself and root. | |
I installed the thin gem using 'gem install thin' | |
I then installed thin to the system using | |
'thin install' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'ramaze' | |
require 'bacon' | |
require 'ramaze/spec/bacon' | |
Ramaze.middleware :spec do | |
run Ramaze.core | |
end | |
Ramaze::Log.level = Logger::ERROR | |
Ramaze.options.mode = :spec | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'wx' | |
class Runner < Wx::App | |
attr_accessor :splash | |
def on_init | |
splash_file = File.join(File.dirname(__FILE__), 'media', 'splash.png') | |
splash_bitmap = Wx::Bitmap.new(splash_file, Wx::BITMAP_TYPE_PNG) | |
@splash = Wx::SplashScreen.new(splash_bitmap, | |
Wx::SPLASH_CENTRE_ON_SCREEN|Wx::SPLASH_NO_TIMEOUT, 0, nil, -1) | |
@splash.show |