shoes/shoes4 — pull request #238 by hkal (2013-05-01 00:26:46+00:00)
Title: Use .rvmrc for JRUBY_OPTS

Earlier, I was trying to build shoes4 on a fresh install of Mac OS X Lion and I ran into an issue installing nokogiri from `bundle install`. For posterity, here is the error:

Installing nokogiri (1.6.0.rc1)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/Users/hkal/.rvm/rubies/jruby-1.7.3/bin/jruby extconf.rb
NotImplementedError: C extension support is not enabled. Pass -Xcext.enabled=true to JRuby or set JRUBY_OPTS or modify .jrubyrc to enable.

(root) at /Users/hkal/.rvm/rubies/jruby-1.7.3/lib/ruby/shared/mkmf.rb:8
require at org/jruby/RubyKernel.java:1027
(root) at /Users/hkal/.rvm/rubies/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1
(root) at extconf.rb:5

Gem files will remain installed in /Users/hkal/.rvm/gems/jruby-1.7.3@shoes/gems/nokogiri-1.6.0.rc1 for inspection.
Results logged to /Users/hkal/.rvm/gems/jruby-1.7.3@shoes/gems/nokogiri-1.6.0.rc1/ext/nokogiri/gem_make.out

An error occurred while installing nokogiri (1.6.0.rc1), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.6.0.rc1'` succeeds before bundling.
galatea:shoes4 hkal$ gem install nokogiri -v '1.6.0.rc1'
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.

/Users/hkal/.rvm/rubies/jruby-1.7.3/bin/jruby extconf.rb
NotImplementedError: C extension support is not enabled. Pass -Xcext.enabled=true to JRuby or set JRUBY_OPTS or modify .jrubyrc to enable.

(root) at /Users/hkal/.rvm/rubies/jruby-1.7.3/lib/ruby/shared/mkmf.rb:8
require at org/jruby/RubyKernel.java:1027
(root) at /Users/hkal/.rvm/rubies/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1
(root) at extconf.rb:5

Gem files will remain installed in /Users/hkal/.rvm/gems/jruby-1.7.3@shoes/gems/nokogiri-1.6.0.rc1 for inspection.
Results logged to /Users/hkal/.rvm/gems/jruby-1.7.3@shoes/gems/nokogiri-1.6.0.rc1/ext/nokogiri/gem_make.out

It turns out I needed to run JRuby with `-Xcext.enabled=true`. The suggested method of achieving this would've forced me to export `JRUBY_OPTS`. This pull request is an attempt to sandbox shoes4 JRuby switches to the project's directory.