<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>Nick Sieger: Tag rubygems</title>
  <subtitle type="html">do what you love</subtitle>
  <id>tag:blog.nicksieger.com,2005:Typo</id>
  <generator uri="http://www.typosphere.org" version="4.0">Typo</generator>
  <link rel="self" type="application/atom+xml" href="http://blog.nicksieger.com/xml/atom10/tag/rubygems/feed.xml"/>
  <link rel="alternate" type="text/html" href="http://blog.nicksieger.com/articles/tag/rubygems?tag=rubygems"/>
  <updated>2007-08-31T17:28:11+00:00</updated>
  <entry>
    <author>
      <name>Nick Sieger</name>
    </author>
    <id>urn:uuid:11809439-cf89-4dc7-9fe1-933dc6609ebc</id>
    <published>2007-03-06T03:58:00+00:00</published>
    <updated>2007-08-31T17:28:11+00:00</updated>
    <title>ActiveRecord-JDBC 0.2.3 Released</title>
    <link rel="alternate" type="text/html" href="http://blog.nicksieger.com/articles/2007/03/06/activerecord-jdbc-0-2-3-released"/>
    <category term="jruby" scheme="http://blog.nicksieger.com/articles/tag/jruby"/>
    <category term="ruby" scheme="http://blog.nicksieger.com/articles/tag/ruby"/>
    <category term="rubygems" scheme="http://blog.nicksieger.com/articles/tag/rubygems"/>
    <content type="html">&lt;p&gt;ActiveRecord-JDBC version 0.2.3 has been released!&lt;/p&gt;

&lt;h3&gt;Install&lt;/h3&gt;

&lt;p&gt;Use JRuby to install the gem into your JRuby installation as follows.  Currently, Rails is not a dependency of ActiveRecord-JDBC; it is assumed you&amp;#8217;re going to have Rails installed already.&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;$ jruby --command gem install ActiveRecord-JDBC
Successfully installed ActiveRecord-JDBC-0.2.3
Installing ri documentation for ActiveRecord-JDBC-0.2.3...
Installing RDoc documentation for ActiveRecord-JDBC-0.2.3...&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;See &lt;a href="http://jruby-extras.rubyforge.org/ActiveRecord-JDBC"&gt;the new RDoc documentation on Rubyforge&lt;/a&gt; for more information on how to use ActiveRecord-JDBC.  If you&amp;#8217;re grabbing the &lt;a href="/articles/2007/03/06/countdown-to-1-0-jruby-0-9-8-released"&gt;new JRuby 0.9.8 release&lt;/a&gt;, be sure you get this one as well if you plan to try out &lt;a href="http://www.headius.com/jrubywiki/index.php/JRuby_on_Rails"&gt;JRuby on Rails&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;Changes&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Release coincides (and compatible) with JRuby 0.9.8 release&lt;/li&gt;
&lt;li&gt;&lt;a href="http://rubyurl.com/0Da"&gt;8 bugs fixed&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Improvements and compatibility fixes for Rails 1.2.x&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Comments, questions, test cases, patches and all that are welcome over on the &lt;a href="http://rubyforge.org/mail/?group_id=2014"&gt;jruby-extras mailing list&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Nick Sieger</name>
    </author>
    <id>urn:uuid:56bbb86c-adaf-4e91-b2a4-5644bffbea7a</id>
    <published>2007-01-12T04:27:07+00:00</published>
    <updated>2007-08-31T18:00:07+00:00</updated>
    <title>Self-cloning JRuby and RubyGems in a Jar</title>
    <link rel="alternate" type="text/html" href="http://blog.nicksieger.com/articles/2007/01/12/self-cloning-jruby-and-rubygems-in-a-jar"/>
    <category term="jruby" scheme="http://blog.nicksieger.com/articles/tag/jruby"/>
    <category term="ruby" scheme="http://blog.nicksieger.com/articles/tag/ruby"/>
    <category term="rubygems" scheme="http://blog.nicksieger.com/articles/tag/rubygems"/>
    <content type="html">&lt;p&gt;As part of &lt;a href="http://jira.codehaus.org/browse/JRUBY-419"&gt;some work I&amp;#8217;m doing&lt;/a&gt; to make JRuby more portable and easier to run standalone without all the &lt;code&gt;$JRUBY_HOME&lt;/code&gt; launcher scripts, it&amp;#8217;s now easier than ever to get up and running with JRuby, or to launch in your build scripts or IDE in a platform-neutral way.  (Note: as of this writing, this feature is in &lt;a href="http://snapshots.repository.codehaus.org/org/jruby/jruby-complete/0.9.3-SNAPSHOT/"&gt;0.9.3 jruby-complete snapshots older than 2007/01/11 only&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;Here, give it a try:&lt;/p&gt;

&lt;h3&gt;IRB in a jar&lt;/h3&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;$ curl -o jruby-complete.jar http://snapshots.repository.codehaus.org/org/jruby/jruby-complete/0.9.3-SNAPSHOT/jruby-complete-0.9.3-20070112.032908-4.jar
$ java -jar jruby-complete.jar --command irb
irb(main):001:0&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3&gt;RubyGems in a jar&lt;/h3&gt;

&lt;p&gt;RubyGems needs a place to unpack and run gems, so JRuby currently will hide all that away from you in &lt;code&gt;~/.jruby&lt;/code&gt;.  (Also, unfortunately we exceed Java&amp;#8217;s default memory size when downloading the RubyGems index file, so you&amp;#8217;ll have to add the &lt;code&gt;-Xmx256m&lt;/code&gt; argument for now to avoid an out of memory condition.)&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;$ java -Xmx256m -jar jruby-complete.jar --command gem install tattle -y --no-rdoc --no-ri
creating /Users/nicksieger/.jruby/bin/gem
... more files extracted ...
copying /Users/nicksieger/jruby-complete.jar to /Users/nicksieger/.jruby/lib
Bulk updating Gem source index for: http://gems.rubyforge.org
Successfully installed tattle-1.0.1
Successfully installed hoe-1.1.7
Successfully installed rubyforge-0.4.0
Successfully installed rake-0.7.1&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You can still have JRuby unpack to a shared directory if you like, and use the regular shell scripts for launching JRuby.  In this case, JRuby is actually replicating itself into the directory you choose.  Simply add the &lt;code&gt;bin&lt;/code&gt; subdirectory to your &lt;code&gt;$PATH&lt;/code&gt;, and continue to use JRuby just as you would a regular Ruby installation.&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;$ sudo java -jar jruby-complete.jar --command extract /opt/local/jruby
Password:
creating /opt/local/jruby/bin/gem
... more files extracted ...
copying /Users/nicksieger/jruby-complete.jar to /opt/local/jruby/lib
$ PATH=/opt/local/jruby/bin:$PATH
$ which gem
/opt/local/jruby/bin/gem
$ jirb
irb(main):001:0&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3&gt;Tattle-tale&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;--command&lt;/code&gt; argument is not limited to just &lt;code&gt;gem&lt;/code&gt; and &lt;code&gt;irb&lt;/code&gt;.  Once you&amp;#8217;ve installed any gem that has an accompanying executable script, you can simply pass that argument as the &lt;code&gt;--command&lt;/code&gt;:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;$ java -jar jruby-complete.jar --command tattle report
ruby_install_name, jruby
LIBRUBY, jruby
target, java
arch, java
host_vendor, Apple Computer, Inc.
key, b1bd5eaf4254d9874ca297995b906be6f4975d395dd0136432f859c62a33cc8c
host_os, Mac OS X
ruby_version, 1.8.5
build, java
target_cpu, i386
prefix, /Users/nicksieger/.jruby
report_time, Thu Jan 11 22:21:57 CST 2007
rubygems_version, 0.9.0
host_cpu, i386
LIBRUBY_SO, jruby
SHELL, /bin/sh
$ java -jar jruby-complete.jar --command tattle
Posting information to Tattle server.  Thanks!&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And lo and behold, there&amp;#8217;s a &lt;code&gt;ruby_install_name&lt;/code&gt; of &lt;code&gt;java&lt;/code&gt; at the new &lt;a href="http://tattle.rubygarden.org"&gt;Gem Tattle homepage&lt;/a&gt;!&lt;/p&gt;</content>
  </entry>
</feed>
