Hi,

On Aug 20, 2008, at 3:17 PM, Assaf Arkin wrote:

On Wed, Aug 20, 2008 at 1:08 PM, Shane Witbeck <[EMAIL PROTECTED] > wrote:
This "should" be MRI, not jruby. In any case...

vandyk:buildr shane$ echo $JAVA_HOME
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home

MRI requires JAVA_HOME to install RJB, and unfortunately, sudo doesn't
pass it from your environment, so when using sudo, you need to sudo
env JAVA_HOME=$JAVA_HOME.

Another option is to modify your sudo options (using visudo) so that JAVA_HOME is inherited when you sudo. Then you don't have to worry about it (at least until you try to install on a different machine). E.g., add this line:

Defaults        env_keep += "JAVA_HOME"

Rhett



On the other hand, you don't need to sudo rake install or rake setup;
they will sudo when running gem commands.  In fact, sudo rake install
has the nasty side effect of creating the pkg directory as root, so
you need to sudo rake clobber.

Assaf



-Shane


On Wed, Aug 20, 2008 at 3:56 PM, Assaf Arkin <[EMAIL PROTECTED]> wrote:

Missing JAVA_HOME?


On Aug 20, 2008, at 12:41 PM, "Shane Witbeck" <[EMAIL PROTECTED] >
wrote:

Sorry, here's the full trace...

(in /Users/shane/projects/thirdparty/buildr)
Missing Gems rjb (= 1.1.4), please run rake setup first!
** Invoke install (first_time)
** Invoke setup (first_time)
** Execute setup
Bulk updating Gem source index for: http://gems.rubyforge.org/
Updating metadata for 2 gems from http://people.apache.org/~assaf/ <http://people.apache.org/%7Eassaf/>
gems/
..
complete
Bulk updating Gem source index for: http://gems.rubyforge.org/
Updating metadata for 2 gems from http://people.apache.org/~assaf/ <http://people.apache.org/%7Eassaf/>
gems/
..
complete
Installing rjb-1.1.4 ...
rake aborted!
can't convert nil into String
/Users/shane/projects/thirdparty/buildr/rakelib/setup.rake:47:in ` +'
/Users/shane/projects/thirdparty/buildr/rakelib/setup.rake:47:in
`install_gem'
/Users/shane/projects/thirdparty/buildr/rakelib/setup.rake:58
/Users/shane/projects/thirdparty/buildr/rakelib/setup.rake:57:in `each'
/Users/shane/projects/thirdparty/buildr/rakelib/setup.rake:57
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in
`invoke_with_call_chain'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
`synchronize'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
`invoke_with_call_chain'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:518:in
`invoke_prerequisites'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `send' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:515:in
`invoke_prerequisites'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:507:in
`invoke_with_call_chain'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
`synchronize'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
`invoke_with_call_chain'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in
`invoke_task'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in
`top_level'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in
`top_level'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
`standard_exception_handling'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in
`top_level'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
`standard_exception_handling'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31
/opt/local/bin/rake:16:in `load'
/opt/local/bin/rake:16

-Shane


On Tue, Aug 19, 2008 at 3:35 PM, Shane Witbeck <[EMAIL PROTECTED]
wrote:

Any ideas? Here's a full transcript:

vandyk:buildr shane$ sudo rake install
Password:
(in /Users/shane/projects/thirdparty/buildr)
Missing Gems rjb (= 1.1.4), please run rake setup first!
Updating metadata for 350 gems from http://gems.rubyforge.org/


..............................................................................................................................................................................................................................................................................................................................................................
complete
Bulk updating Gem source index for: http://gems.rubyforge.org/
Installing rjb-1.1.4 ...
rake aborted!
can't convert nil into String

(See full trace by running task with --trace)
vandyk:buildr shane$ sudo rake install
(in /Users/shane/projects/thirdparty/buildr)
Missing Gems rjb (= 1.1.4), please run rake setup first!
Bulk updating Gem source index for: http://gems.rubyforge.org/
Updating metadata for 2 gems from http://people.apache.org/~assaf/gems/ <http://people.apache.org/%7Eassaf/gems/>
<http://people.apache.org/%7Eassaf/gems/>
..
complete
Bulk updating Gem source index for: http://gems.rubyforge.org/
Updating metadata for 2 gems from http://people.apache.org/~assaf/gems/ <http://people.apache.org/%7Eassaf/gems/>
<http://people.apache.org/%7Eassaf/gems/>
..
complete
Installing rjb-1.1.4 ...
rake aborted!
can't convert nil into String

(See full trace by running task with --trace)
vandyk:buildr shane$



-Shane




Reply via email to