Fascinating. Creating a windows shortcut didn't really
work, but it made me realize that #!/usr/bin/env ruby
wasn't what caused ruby to be invoked. It was the .rb
file association on Windows. (God, I'm slow today.)

Changing the file associations for .rb and .rbw causes
the correct interpreter to be invoked, which is rather
helpful.

Unfortunately, it's not yet a total solution:

  > therush.rb
  therush.rb:7:in `require':
  no such file to load -- history (LoadError)

  > echo %RUBYOPT%
  rubygems

It looks as though the RUBYOPT environment variable isn't
doing the right thing, so the history.rb isn't being
found. I'm sure it's my problem, at this point. But I'm
once again at a loss to see what the problem is.

Thomas E Enebo wrote:
If you softlink jruby to ruby and put it higher in the path than C
ruby you should be ok.  Kind of rough if you want both Rubys in your
path.

-Tom

On 5/31/07, Eric Armstrong <[EMAIL PROTECTED]> wrote:
Good thought. But I'm afraid I was far more stupid
than that. I was executing therush.rb, which contains

    #!/usr/bin/env ruby

So the C Ruby gems-library reader was being invoked. (Doh!)

I wonder. Might it be possible to redirect such scripts
so they automatically run under JRuby, instead? (I'd
rather not have to edit downloaded scripts to make them
work.)

Thomas E Enebo wrote:
> It sounds like you have some strange environment issue where it is
> mixing up C Ruby and JRuby settings.  Here is one way I do this to
> avoid conflicts:
>
> jruby -S gem install therush
>
> I rarely set up additional environment variables (Your jruby_home and
> path envs look good to me).
>
> -Tom
>
> On 5/30/07, Eric Armstrong <[EMAIL PROTECTED]> wrote:
>> I installed the rubyshell gem. But its require statements
>> aren't finding its libraries. When I have RUBYOPT set to
>> rubygems, the rubygems installer is found in the pre-existing
>> ruby installation, instead of jruby:
>> ===================================
>> c:\jruby-1.0.0RC2\lib\ruby\gems\1.8\gems\THERuSH-0.9\bin\therush.rb
>>    ^^^^^^^^^^^^^^^^
>> c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:
>>    ^^^^^^
>> in gem_original_require:
>> no such file to load -- history.rb (LoadError)
>> ===================================
>>
>> But when I leave that option undefined, gem libraries aren't
>> found at all:
>> ===================================
>> c:\jruby-1.0.0RC2\lib\ruby\gems\1.8\gems\THERuSH-0.9\bin\therush.rb
>> C:/jruby-1.0.0RC2/lib/ruby/gems/1.8/gems/THERuSH-0.9/bin/therush.rb:7:
>> in `require': no such file to load -- history.rb (LoadError)
>> from C:/jruby-1.0.0RC2/lib/ruby/gems/1.8/gems/THERuSH-0.9/bin/therush.rb
>> :7
>> (Line 7: require 'history.rb')
>> ===================================
>>
>> What additional steps do I need to take so gem libs are found?
>> I've removed all references to the Ruby installation in the
>> enviroment settings, but while I've restarted the command
>> shell, I haven't rebooted. That and the registry are about
>> the only options left.
>>
>> Here are my current settings:
>>
>>    JRUBY_HOME  c:\jruby-1.0.0RC2
>>    PATH        %JRUBY_HOME%\bin;...
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>
>


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email






---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to