Issues with Aptana 3.0 Radrails

Sanjay's Avatar

Sanjay

15 May, 2011 03:50 AM

Hello,

I have been using an older version of Radrails for a while and it all worked fine. I am moving to Rails 3.0 so decided to upgrade Radrails to Aptana 3.0 IDE. I am running into a few things -

  1. Can't find the "Servers View" that I had earlier so I can control/assign the port numbers for various projects
  2. Don't see a Ruby/Rails perspective
  3. When I launch a "Debug Server" for a project I get the error below

Appreciate any help/points to help resolve.

Thanks,
-S

Fast Debugger (ruby-debug-ide 0.4.16, ruby-debug-base 0.11) listens on 127.0.0.1:49228
Fatal exception in DebugThread loop: The requested service provider could not be loaded or initialized. - socket(2)
Backtrace:
c:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.16/lib/ruby-debug-ide.rb:135:in initialize' from: c:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.16/lib/ruby-debug-ide.rb:135:innew' from: c:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.16/lib/ruby-debug-ide.rb:135:in `block in start_control'

Showing the most recent page of comments. View the first page

  1. Support Staff 32 Posted by Chris Williams on 26 May, 2011 06:59 PM

    Chris Williams's Avatar

    David, that's great to hear. I would like to know what is different about the ENV we're launching with that is breaking this for you. Specifically what is the value for RUBYLIB on the command line env, inside the IDE Terminal view, and when launching a ruby file through the IDE's Run As > Ruby Application shortcut?

  2. 33 Posted by Aaron Patterson on 26 May, 2011 08:04 PM

    Aaron Patterson's Avatar

    I created a quick one-line ruby script to find the value for RUBYLIB.

    $stderr.printf ENV['RUBYLIB']

    When I ran the script (from the command line and inside of the IDE), I received this error msg:

    c:/Users/Aaron/Desktop/env.rb:2:in 'printf': can't convert nil into String (TypeError)
    from c:/Users/Aaron/Desktop/env.rb:2:in 'main'

    It looks like that environment variable was not set on my machine. So, it looks like Aptana is assuming that the variable is set, and throws the FastDebugger error when it is not.

  3. Support Staff 34 Posted by Chris Williams on 26 May, 2011 08:37 PM

    Chris Williams's Avatar

    We're not doing anything special to check the loadpath and abort. Again, this failure is actually coming from the fast debugger gem itself. It's likely picking up a bad/corrupt/out of date library or dll that is breaking the ability to open the socket.

    I thought you could spit out the RUBYLIB env from inside a ruby script, but basically it's a special env var that affects the loadpaths for ruby. So I guess the best thing we could compare is the loadpaths:

    puts $:
    

    What I need is the value from outside the IDE (on the command line), from the Terminal view inside the IDE, and from right clicking the ruby file and choosing Run As > Ruby Application.

  4. 35 Posted by David Pershouse on 26 May, 2011 10:12 PM

    David Pershouse's Avatar

    running puts $: as a ruby app in aptana says:

    C:/Ruby192/lib/ruby/site_ruby/1.9.1
    C:/Ruby192/lib/ruby/site_ruby/1.9.1/i386-msvcrt
    C:/Ruby192/lib/ruby/site_ruby
    C:/Ruby192/lib/ruby/vendor_ruby/1.9.1
    C:/Ruby192/lib/ruby/vendor_ruby/1.9.1/i386-msvcrt
    C:/Ruby192/lib/ruby/vendor_ruby
    C:/Ruby192/lib/ruby/1.9.1
    C:/Ruby192/lib/ruby/1.9.1/i386-mingw32

    running it in aptana console says
    c:/Ruby192/lib/ruby/site_ruby/1.9.1
    c:/Ruby192/lib/ruby/site_ruby/1.9.1/i386-msvcrt
    c:/Ruby192/lib/ruby/site_ruby
    c:/Ruby192/lib/ruby/vendor_ruby/1.9.1
    c:/Ruby192/lib/ruby/vendor_ruby/1.9.1/i386-msvcrt
    c:/Ruby192/lib/ruby/vendor_ruby
    c:/Ruby192/lib/ruby/1.9.1
    c:/Ruby192/lib/ruby/1.9.1/i386-mingw32

    running it from cmd window says
    C:/Ruby192/lib/ruby/site_ruby/1.9.1
    C:/Ruby192/lib/ruby/site_ruby/1.9.1/i386-msvcrt
    C:/Ruby192/lib/ruby/site_ruby
    C:/Ruby192/lib/ruby/vendor_ruby/1.9.1
    C:/Ruby192/lib/ruby/vendor_ruby/1.9.1/i386-msvcrt
    C:/Ruby192/lib/ruby/vendor_ruby
    C:/Ruby192/lib/ruby/1.9.1
    C:/Ruby192/lib/ruby/1.9.1/i386-mingw32

    so basically no difference. I think the bug must be in the plugin debug
    launcher? maybe it isn't getting the environment properly. It seems to use a
    different launcher in the source to "run as ruby app"

    On Fri, May 27, 2011 at 6:37 AM, Chris Williams <
    [email blocked]> wrote:

  5. Support Staff 36 Posted by Chris Williams on 26 May, 2011 11:21 PM

    Chris Williams's Avatar

    I suppose you could hack the rdebug-ide script the spit out the
    environment and the loadpath before it actually does the starting of the
    debugger, and then try debugging something through the IDE to see the
    output and see if there's any difference there.

    On 5/26/11 3:12 PM, "David Pershouse"
    <[email blocked]> wrote:

  6. 37 Posted by David Pershouse on 27 May, 2011 08:02 AM

    David Pershouse's Avatar

    Done that:

    C:\Ruby192\lib\ruby\1.9.1
    C:/Ruby192/lib/ruby/site_ruby/1.9.1
    C:/Ruby192/lib/ruby/site_ruby/1.9.1/i386-msvcrt
    C:/Ruby192/lib/ruby/site_ruby
    C:/Ruby192/lib/ruby/vendor_ruby/1.9.1
    C:/Ruby192/lib/ruby/vendor_ruby/1.9.1/i386-msvcrt
    C:/Ruby192/lib/ruby/vendor_ruby
    C:/Ruby192/lib/ruby/1.9.1
    C:/Ruby192/lib/ruby/1.9.1/i386-mingw32

    the first line is what I added to the Environment in the config. the rest
    seems the same.

    On Fri, May 27, 2011 at 9:21 AM, Chris Williams <
    [email blocked]> wrote:

  7. 38 Posted by David Pershouse on 27 May, 2011 08:23 AM

    David Pershouse's Avatar

    Ahh, I used procmon to monitor which files it accesses when it works vs when
    it doesnt.
    It seems that when c:\ruby192\lib\ruby\1.9.1 isn't first in the path, then
    it loads socket.so directly whereas when it does work it loads socket.rb
    from the c:\ruby192\lib\ruby\1.9.1 path.

  8. 39 Posted by David Pershouse on 27 May, 2011 08:26 AM

    David Pershouse's Avatar

    scratch that. I ran it wrong.

  9. 40 Posted by Fabricio Guzman on 30 May, 2011 12:43 AM

    Fabricio Guzman's Avatar

    David,

    Many thanks over. I spent the better part of two days running this problem down. The RUBYLIB environment variable did the trick in Eclipse 3.6. These are the steps I took...
    Download/Install ruby1.9.2 (rubyinstaller-1.9.2-p180.exe) from rubyinstaller.org
    Download/Install DevKit (DevKit-tdm-32-4.5.1-20101214-1400-sfx.exe) from rubyinstaller.org

    run the following commands in a dos window:
    cd c:\DevKit
    ruby dk.rb init
    ruby dk.rb install
    gem install ruby-debug-ide19 --platform=ruby

    open eclipse:
    open your project
    in the project explorer righ-click your project
    Debug As -> Debug Configurations...
    Select a ruby file under "Ruby Application"
    Select the "Environment" tab and add a new variable
    name: RUBYLIB; value: C:\Ruby192\lib\ruby\1.9.1

    That it, did the trick! Thanks again David.

  10. Support Staff 41 Posted by Chris Williams on 03 Jun, 2011 01:26 PM

    Chris Williams's Avatar

    I was finally able to reproduce this issue in a Windows 7 VM. It looks like it's a bug related to using a shell (PortableGit) in a location that has spaces in the path. It happens if you opt to use our pre-packaged PortableGit, which installs under the Studio install, which sometimes will have spaces in it (for me, it's my name under C:/Users).

    Here's the bug: https://aptana.lighthouseapp.com/projects/35272-studio/tickets/2548...

    I'm verifying a fix now.

  11. Chris Williams closed this discussion on 03 Jun, 2011 01:26 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac