Bug 96096 - Ruby doesn't work with spaces in path name
Ruby doesn't work with spaces in path name
Status: VERIFIED FIXED
Product: ruby
Classification: Unclassified
Component: Code
6.x
All All
: P1 (vote)
: 6.x
Assigned To: Torbjorn Norbye
issues@ruby
: SPACE_IN_PATH
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-02-21 07:08 UTC by _ tboudreau
Modified: 2009-05-18 13:25 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
Userdir tree (11.69 KB, text/plain)
2007-02-21 22:14 UTC, _ tboudreau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2007-02-21 07:08:40 UTC
Log output from the output window when creating the project (I assume this
logging will go away for release?):

STARTING
C:0:Warning: require_gem is obsolete.  Use gem instead.
C:/Documents and
Settings/Tim/.netbeans/dev/jruby-0.9.2/lib/ruby/site_ruby/1.8/rubygems.rb:301:in
`report_activate_error': Could not find RubyGem activesupport (= 1.3.1)
(Gem::LoadError)

        from C:/Documents and
Settings/Tim/.netbeans/dev/jruby-0.9.2/lib/ruby/site_ruby/1.8/rubygems.rb:239:in
`activate'
        from C:/Documents and
Settings/Tim/.netbeans/dev/jruby-0.9.2/lib/ruby/site_ruby/1.8/rubygems.rb:264:in
`activate'
        from C:/Documents and
Settings/Tim/.netbeans/dev/jruby-0.9.2/lib/ruby/site_ruby/1.8/rubygems.rb:76:in
`each'
        from C:/Documents and
Settings/Tim/.netbeans/dev/jruby-0.9.2/lib/ruby/site_ruby/1.8/rubygems.rb:265:in
`activate'
        from C:/Documents and
Settings/Tim/.netbeans/dev/jruby-0.9.2/lib/ruby/site_ruby/1.8/rubygems.rb:76:in
`active_gem_with_options'
        from C:/Documents and
Settings/Tim/.netbeans/dev/jruby-0.9.2/lib/ruby/site_ruby/1.8/rubygems.rb:61:in
`require_gem'
        from C:\Documents and Settings\Tim\.netbeans\dev\jruby-0.9.2\bin\rails:17
RUN COMPLETED
Comment 1 Torbjorn Norbye 2007-02-21 16:27:03 UTC
There appears to be something wrong with your installation... activesupport is
missing. Can you go looking at 

C:/Documents and Settings/Tim/.netbeans/dev/jruby-0.9.2/lib/ruby/gems/1.8/gems/

and make sure you have activesupport-1.3.1/lib  there?

How did you get the bits - did you install from Auto Update (did you install
absolutely all the modules in the Ruby category?), or build from sources, or
grab a kit from deadlock.netbeans.org or elsewhere?

Have you by any chance configured a different Ruby interpreter (or Rails
installation) for yourself under Options | Miscellaneous?

By the way, no - this isn't logging, this is output from the Rails generator
(which will be hyperlinked etc) which is there intentionally. Almost everything
you do in Rails is running this generator, so it works a bit differently than
other types of projects.
Comment 2 _ tboudreau 2007-02-21 22:13:18 UTC
I got the bits from autoupdate, on my first run after blowing away my userdir.

The files seem to be there.  I'll attach the output from dir /s.

I do have plain-old Ruby for windows installed with its bin/ dir on the PATH (
http://rubyforge.org/frs/?group_id=167 )
Comment 3 _ tboudreau 2007-02-21 22:14:19 UTC
Created attachment 38790 [details]
Userdir tree
Comment 4 Craig Mcclanahan 2007-02-21 22:21:22 UTC
FWIW, this works for me (build 175) on Solaris Dev Express.  Tim, one thing to
try would be installing NetBeans someplace that does not have spaces in the path
(Documents and Settings) -- I wouldn't be surprised if there are problems either
in NB or perhaps even in Ruby itself related to paths with spaces.
Comment 5 _ tboudreau 2007-02-21 22:32:41 UTC
My NB installation doesn't have spaces in the path - it's c:\netbeans.  My user
dir has spaces in the path - but so will anybody's on Windows, so that's going
to need to work.

There actually is a keyword SPACE_IN_PATH which you can add to the keywords
field above;  AFAIK there are no currently known problems in NetBeans wrt spaces
in paths.  Are there any libs you are using that use paths or file URLs or such
and could be getting confused?
Comment 6 Torbjorn Norbye 2007-02-22 01:37:44 UTC
This appears to be a space-in-pathname issue. I could reproduce this on OSX with
spaces in the path.

I have made a couple of fixes to my own code, but it's still broken because
there are bugs in the JRuby launcher script itself. I was just talking to Tom
Enebo and he's going to fix the Unix one. I'm still seeing problems on Windows;
it's possible jruby.bat needs fixes too. I'm working on it. Will investigate
more tomorrow. Bumping up priority; JRuby installation in the userdir will be
common on Windows since that's what happens with Auto Update.
Comment 7 Tomas Danek 2007-02-22 16:51:11 UTC
NetBeans IDE Dev (Build 200702211900)
1.6.0-rc; Java HotSpot(TM) Client VM 1.6.0-rc-b104
Windows XP version 5.1 running on x86
en_US (nb); Cp1252
-----------------------------------------------------------
i did following:
- downloaded lastest zip build
- ran it only with param --jdkhome
- created rubyapp1 - into default location, i.e. 
C:\Documents and Settings\Tomas\My Documents\NetBeansProjects
- ran by F6:
STARTING
Error opening script file: and (The system cannot find the file specified)
RUN COMPLETED


-now i created rubyapp2 - into c:\
-ran by F6:
STARTING
Hello World
RUN COMPLETED

so the problem probably is not the location of modules in userdir (C:\Documents
and Settings\Tomas\.netbeans\dev\jruby-0.9.2\bin\jruby.bat) , but in location of
script to be ran.

P.S.Vista user won't probably meet this, because C:\Documents and Settings is
not used anymore,it is replaced with C:\Users in Vista.


Comment 8 Torbjorn Norbye 2007-02-23 15:30:40 UTC
This should be mostly fixed now. Unfortunately, for Ruby On Rails, the Rails
script fails halfway through in what looks like a space-path related error. For
now I have blocked Rails project creation on Windows when Rails is in a
space-path. (There's an error message in the New wizard which disables the
Finish button).

Everything else should work.
Comment 9 Torbjorn Norbye 2007-03-05 23:41:29 UTC
I just checked in a new copy of the bundled JRuby, using a fresh trunk. I was
doing so primarily to pick up SSL related fixes which will let us use the gem
manager to fetch SSL functionality - but it meant I also picked up recent JRuby
fixes.

In particular, JRuby integration #3120 is included which modified a bunch of the
Windows launcher scripts to fix spaces-in-path issues.

I'm hopeful that this addresses the last spaces-in-path issues - but I don't
have a Windows machine to check. When the Update center eventually contains
"JRuby Implementation 0.92.8", can somebody check whether this is working?
Comment 10 Torbjorn Norbye 2007-03-13 23:57:16 UTC
Can anybody with Windows let me know if the JRuby 0.9.8 change fixed this?
Comment 11 Torbjorn Norbye 2007-03-19 22:10:28 UTC
I'm now bypassing the JRuby launcher script completely, which I think should solve this.  However, there's 
a bunch of new launcher code (untested since I don't have Windows) which could have issues. I did update 
a few things such that by feature level 0.39 it should work right. Unfortunately, I think the Daily Build cut 
off was between my initial checkin and the spaces in path modifications so it's possibel that the daily 
update center will have broken bits for a day. For the latest, always go to the nbextras.org builds - see 
http://wiki.netbeans.org/wiki/view/RubyInstallation.
Comment 12 Tomas Danek 2007-03-22 17:20:08 UTC
I've tried this today on XP (with custom build of ide+ruby), using standard
userdir (c:\Documents and settings\whatever..):

Created ruby app (in folder containing space in path), ran it - OK
Created rails app (again in folder containing space in path), ran it - OK

if there's another testcase which is bounded with this issue, let me know.. 
Comment 13 Torbjorn Norbye 2007-03-22 20:09:49 UTC
The issue we had before was where -jruby- was in a path with spaces in it (because when it was installed 
from the update center, the jruby code would get placed in the user dir which often contains spaces).  
There was a bug in jruby.bat which didn't handle the case where JRuby itself is in a path location. Can you 
check that scenario?
Comment 14 William Leonard 2007-03-27 00:16:07 UTC
Using Ruby Feature Level 0.45, and keeping my default userdir (with spaces in
the path) I was able to build this simple Flickr application:
http://weblogs.java.net/blog/bleonard/archive/2007/03/building_a_ruby.html

/Brian
Comment 15 Torbjorn Norbye 2007-03-27 00:22:10 UTC
Thank you so much for confirming - closing this issue as fixed. I'll be taking out the verbiage from the 
Rails wizard warning about spaces in the path in my next checkin.
Comment 16 Jiri Kovalsky 2007-07-03 13:58:41 UTC
Reassigning this issue to newly created 'ruby' component.
Comment 17 Jiri Kovalsky 2007-07-03 14:42:28 UTC
Changing target milestone of all resolved Ruby issues from TBD to 6.0 Beta 1 build.
Comment 18 Martin Schovanek 2009-05-18 13:25:43 UTC
v.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo