History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-925
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Thomas E Enebo
Reporter: Evan Light
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
JRuby

Error installing gem: install directory not absolute (Mac OS X 10.4.9)

Created: 09/May/07 02:35 PM   Updated: 23/Apr/08 10:07 AM
Component/s: None
Affects Version/s: JRuby 1.0.0RC1
Fix Version/s: None

Time Tracking:
Not Specified

Environment: Mac OS X 10.4.9
Issue Links:
Related
 


 Description  « Hide
Received the following error when installing rake to a JRuby-unique GEM_HOME (no gems previously installed):

install directory "/usr/local/jruby/lib/ruby/gems/1.8/gems/rake-0.7.3" not absolute



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Albert Strasheim - 20/May/07 02:54 AM
I am running into this same issue with the latest trunk build on Windows. I was previously able to install the Rails gems, so I'm not sure what's wrong now. I have GEM_HOME set correctly as far as I can tell.

Albert Strasheim - 20/May/07 03:07 AM
I have reduced the problem to the following simple from what happens in rubygems/installer.rb around line 351:

directory = 'C:\jruby\jruby-1.0.0RC2\lib\ruby\gems/1.8/gems/cmdparse-2.0.2'
puts directory
puts File.expand_path(directory)
unless File.expand_path(directory) == directory then
raise ArgumentError, "install directory %p not absolute" % directory
end

On my system this prints:

C:\jruby>jruby abspath.rb
C:\jruby\jruby-1.0.0RC2\lib\ruby\gems/1.8/gems/cmdparse-2.0.2
C:/jruby/jruby-1.0.0RC2/lib/ruby/gems/1.8/gems/cmdparse-2.0.2
:-1: install directory "C:\\jruby\\jruby-1.0.0RC2\\lib\\ruby
gems/1.8/gems/cmdparse-2.0.2" not absolute (ArgumentError)

So what seems to be going wrong (at least on Windows) is that GEM_PATH should only use /, not \.


Charles Oliver Nutter - 22/May/07 12:36 PM
Ugh...I don't know if there's even a way to fix this in JRuby. When we expand_path, we turn everything into / so this will never match. I'd say the only way this could ever work is if they do a better test in RubyGems. It's going to be near impossible for us to preserve the original / versus \ in the filename.

Evan Light - 01/Jun/07 09:31 AM
Sorry. This isn't a JRuby issue. Rubygems, in installer.rb, checks to see if File.expand_path(<GEM_HOME_PATH>) == <GEM_HOME_PATH>. The problem, in my case, is that I have my GEM_HOME keyed to my JRuby install through a soft link. This was foolish of me actually – but possibly reasonable for testing gems against particular Ruby interpreter versions.

In any event, File.expand_path resolves the soft link to it's real path which causes the equality check to fail and hence my error.

For me, this means that I'll be migrating my JRuby GEM_HOME external to my JRuby installations. However, this may be something worth taking up with the Rubygems fellas.


Evan Light - 01/Jun/07 09:32 AM
Woops. Should've read your comment better before posting mine.

Still, I agree that this problem should possibly be resolved through Rubygems.