Hi All Can any body tell me how to install JRUBY on Windows ? Regards Ravinder Singroha Charles Oliver Nutter wrote: > John Miller wrote: >> Greetings All, >> >> I have concluded that I ought to try out JRuby. Running on windows I >> get the short end of the stick when it comes to non-ruby-native >> functionality, and there is an AI package in Java that I want to play >> with in a language that doesn't require a novel worth of code to use. I >> have a few questions about how to make this happen: > > I'm late to the party on this one, but here's some answers. > >> 1) What is the best way to get MRI and JRuby to live on the same >> (Windows) system? The only answer I've found to this question involves >> bash scripts. > > Generally, JRuby lives entirely within its unpacked directory. Run > <jruby dir>/bin/jruby and it will handle the rest. If you add JRuby's > bin dir to your path, you can just run "jruby". If you add it after your > Ruby path, and want to make sure you're running 'gem', or 'rails' or > other scripts with JRuby, use "jruby -S <scriptname>". > >> 2) What do I need to get in terms of a Java Environment. below is the >> output of Java -version: >> java version "1.4.1_03" >> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_03-b02) >> Java HotSpot(TM) Client VM (build 1.4.1_03-b02, mixed mode) >> This was likely installed at least 3 years ago, and is probably out of >> date. I went to java.sun.com to look for "the latest version" and hit >> buzzword central. The last time I did anything more then run a Java App >> was 6+ years ago and I'm now lost in all the new Lingo. So, what to I >> need to run JRuby, and what else outh I get to make Rails work with it? > > JRuby 1.1+ requires at least Java 5, but Java 6 (Java SE 6, someone else > posted info on how to download) will provide the best performance. > Install it and that should be all you need. > > Unless you're going to compile Java code, you don't need the compiler. > JRuby's compiler is self-contained. > >> 3) Is is possible to "move" my installed gems from MRI Ruby1.8.6 to >> JRuby without having to touch the network. All I have is a 56.6k modem, >> and Downloading rails again is a 4 hour job. (BTW: Is there a way in >> general to download a gem and not install it? For example could I get >> the latest Rails release on my Laptop at work and bring the files home >> to install on the desktop?) > > Well for Rails, you shouldn't have any problems. Rails installs the same > gems under any Ruby implementation, so your already-downloaded gems > (under lib/ruby/gems/1.8/cache) can be installed in JRuby. I don't know > of a way to just fetch a gem and not install. > >> 4) What does it take to get SQLite or some equivalent no configuration >> database running in JRuby? > > Your best bet would be a database like Derby/JavaDB, which is a > pure-Java embedded database. Using JavaDB, you could produce a DB-driven > app very quickly, and since it's Java the whole app could be packaged up > and moved to another machine and run just as well. If you're using > ActiveRecord, there are gems for derby and other databases. If you're > not using ActiveRecord, it would probably be easiest to just call JDBC > APIs directly. There are blog posts and wiki articles out there that > show how to directly use JDBC from Ruby with JRuby. > > Do check out the JRuby Wiki at http://wiki.jruby.org and feel free to > join the mailing lists or find us on #jruby on Freenode IRC. > > - Charlie -- Posted via http://www.ruby-forum.com/.