NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Cannot use Run, Debug, or Rails Console: NB 6.9.1 nightly and Rails beta
Goto page Previous  1, 2
 
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users
View previous topic :: View next topic  
Author Message
gipnokote



Joined: 31 Aug 2010
Posts: 6

PostPosted: Tue Aug 31, 2010 8:57 pm    Post subject: Reply with quote

That patch didn't help me either Sad
Pleeease make the debug work Sad
Back to top
springbok



Joined: 23 Aug 2010
Posts: 11

PostPosted: Wed Sep 01, 2010 7:50 am    Post subject: Reply with quote

I've had another look at the log file after downloading the latest build, here is a snippet:

FINE [org.rubyforge.debugcommons.RubyDebuggerFactory]: Running [basedir: /var/www/rails/jobbeat]: "/home/etienne/.rvm/rubies/default/bin/ruby -r /tmp/io-synchronizer517
5595319872886098.rb /home/etienne/.rvm/gems/ruby-1.9.2-p0/bin/rdebug-ide _0.4.9_ -p 52673 --xml-debug -- script/rails server mongrel --port 3001"
FINE [org.rubyforge.debugcommons.RubyDebuggerFactory]: Environment: {GEM_PATH=/home/etienne/.rvm/gems/ruby-1.9.2-p0:/home/etienne/.rvm/gems/ruby-1.9.2-p0@global, GTK_MO
DULES=canberra-gtk-module, GNOME_KEYRING_CONTROL=/tmp/keyring-RLtPQk, SHLVL=1, SSH_AGENT_PID=1303, SPEECHD_PORT=7560, XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt, SESSIO
N_MANAGER=local/ubuntu-rails3:@/tmp/.ICE-unix/1240,unix/ubuntu-rails3:/tmp/.ICE-unix/1240, GNOME_DESKTOP_SESSION_ID=this-is-deprecated, GDMSESSION=gnome, XDG_SESSION_CO
OKIE=987f42c1196bc066af224ee14c6e2d1b-1283308865.206422-1010356906, XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/, MANDATORY_PATH=/usr/share/gconf/gnome.
mandatory.path, PWD=/home/etienne, LOGNAME=etienne, J2D_PIXMAPS=shared, _=/usr/lib/jvm/java-6-sun/bin/java, NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat, SSH_AUTH_SOCK=/tmp/keyring-RLtPQk/ssh, LD_LIBRARY_PATH=/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386/client:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/../lib/i386, DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-RXpR8NwUwp,guid=9ba8a7a5a3add8ea58091a534c7dbd41, GDM_KEYBOARD_LAYOUT=us, SHELL=/bin/bash, GNOME_KEYRING_PID=1222, PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games, XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg, GEM_HOME=/home/etienne/.rvm/gems/ruby-1.9.2-p0, DESKTOP_SESSION=gnome, DISPLAY=:0.0, USER=etienne, HOME=/home/etienne, XAUTHORITY=/var/run/gdm/auth-for-etienne-iGPqP8/database, GDM_LANG=en_AU.utf8, DEFAULTS_PATH=/usr/share/gconf/gnome.default.path, USERNAME=etienne, ORBIT_SOCKETDIR=/tmp/orbit-etienne, LANG=en_AU.utf8}
FINE [org.rubyforge.debugcommons.RubyDebuggerProxy]: Proxy target: RubyDebugTarget@9528604[baseDir: /var/www/rails/jobbeat, debuggedFile: script/rails, port: 52673]
FINEST [org.rubyforge.debugcommons.RubyDebuggerProxy]: Cannot connect to 127.0.0.1:52673. Trying again...(29)
FINEST [org.rubyforge.debugcommons.RubyDebuggerProxy]: Successfully attached to 127.0.0.1:52673
FINE [org.rubyforge.debugcommons.RubyDebuggerProxy]: Sending command debugger: start
FINE [org.rubyforge.debugcommons.ReadersSupport]: Starting ReadersSupport readloop: class org.rubyforge.debugcommons.ReadersSupport command loop
FINEST [org.rubyforge.debugcommons.Util]: Received message: <message debug='true'>Starting command read loop</message>
FINEST [org.rubyforge.debugcommons.Util]: Received message: <message debug='true'>Processing: start</message>
FINEST [org.rubyforge.debugcommons.Util]: Received message: <message debug='true'>Starting: running program script</message>
FINEST [org.rubyforge.debugcommons.Util]: Received: END_DOCUMENT event
FINE [org.rubyforge.debugcommons.ReadersSupport]: ReadersSupport readloop [class org.rubyforge.debugcommons.ReadersSupport command loop] successfully finished.
FINEST [org.rubyforge.debugcommons.RubyDebuggerProxy]: Waiting for breakpoints.
FINEST [org.rubyforge.debugcommons.RubyDebuggerProxy]: Socket reader loop finished.
FINE [org.netbeans.api.extexecution.input.InputReaderTask]: Draining the rest of the reader
FINE [org.netbeans.modules.ruby.railsprojects.server.RailsServerManager]: Server startup failed, server type is: org.netbeans.modules.ruby.railsprojects.server.Mongrel@dd572f4e
FINE [org.netbeans.modules.ruby.railsprojects.server.RailsServerManager]: Could not start org.netbeans.modules.ruby.railsprojects.server.Mongrel@dd572f4e in 1 seconds, current server status is NOT_STARTED


It looks like it's calling the correct script, i.e.:

/home/etienne/.rvm/rubies/default/bin/ruby -r /tmp/io-synchronizer517
5595319872886098.rb /home/etienne/.rvm/gems/ruby-1.9.2-p0/bin/rdebug-ide _0.4.9_ -p 52673 --xml-debug -- script/rails server mongrel --port 3001

Not sure about this but it looks like the server is not starting:

Could not start org.netbeans.modules.ruby.railsprojects.server.Mongrel@dd572f4e in 1 seconds, current server status is NOT_STARTED

If anyone can help us out here it would be GREATLY appreciated as it makes it difficult to develop without the debugger.

Thanks,

Etienne.
Back to top
gipnokote



Joined: 31 Aug 2010
Posts: 6

PostPosted: Wed Sep 01, 2010 2:50 pm    Post subject: Reply with quote

I tried to install the nightly build of Netbeans - same error. The only difference between nightly build and 6.9.1 is that nightly also can't start the server without debugging while 6.9.1 can.

My config is:
- fresh Ubuntu 10.04
- ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]
- rubygems1.9.1
- ruby-debug-base19 (0.11.24)
- ruby-debug-ide (0.4.10)
- rails 3.0.0 (the release version, not beta or alpha)

what I see when I try to start the debug:
Code:
Fast Debugger (ruby-debug-ide 0.4.10) listens on :37214
        /usr/local/ruby/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.10/lib/ruby-debug-ide.rb:109:in `debug_load'
        /usr/local/ruby/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.10/lib/ruby-debug-ide.rb:109:in `debug_program'
        /usr/local/ruby/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.10/bin/rdebug-ide:87:in `<top (required)>'
        /usr/local/ruby/bin/rdebug-ide:19:in `load'
        /usr/local/ruby/bin/rdebug-ide:19:in `<main>'
Uncaught exception: no such file to load -- script/rails
Back to top
springbok



Joined: 23 Aug 2010
Posts: 11

PostPosted: Wed Sep 01, 2010 10:35 pm    Post subject: Reply with quote

Hi gipnokote,

My setup is a match to yours although I'm using RVM to manage my ruby versions, I also setup a new Ubuntu 10.04 to do all my Rails3 development.

Not sure if anyone involved with NB development monitors the forum as we've not had any reply regarding this problem. Everything else works great for me apart from debugging which has been one of the must have's for development for me.

Cheers,

Etienne.
Back to top
springbok



Joined: 23 Aug 2010
Posts: 11

PostPosted: Thu Sep 02, 2010 1:22 am    Post subject: Reply with quote

Ok I've finally been able to get debugging going manually for now at least, the steps I followed are:

Quote:
1. Uninstall all debug gems including:
ruby-debug19
ruby-debug-ide19
ruby-debug-base19
linecache19

I originally installed all these gems via my Gemfile & bundle install

2. I removed -J-DrubyDebugIDEName=ruby-debug-ide19 from my netneans.conf file which I had added an attempt to get it working

3. In NB Tools->Ruby Platforms I selected the version I wanted to use, i.e. 1.9.2 and installed the fast debugger via the "Install Fast Debugger" button. This will install v0.4.9 of ruby-debug-ide. You need to make sure your directories are correct as I found that NB does not detect the correct directories when using RVM. My directories are:

Interpreter: /home/etienne/.rvm/rubies/default/bin/ruby (I think because 1.9.2 is my default rvm ruby)
Gem Path:
/home/etienne/.rvm/gems/ruby-1.9.2-p0
/home/etienne/.rvm/gems/ruby-1.9.2-p0@global

4. Once the debugger is successfully installed in a terminal session run something like this to start the debugger manually:

rdebug-ide _0.4.9_ -p 7000 -- /var/www/rails/jobbeat/script/rails server mongrel --port 3010

5. Attach the NB debugger via Debug->Attach Debugger


Doing this allowed me to debug my project at least until all this is fixed.

My debug gems are now:
Quote:
ruby-debug-base19 (0.11.24)
ruby-debug-ide (0.4.9)
linecache19 (0.5.11)


Hope this helps,

Etienne.
Back to top
bkocik



Joined: 03 Oct 2008
Posts: 26

PostPosted: Thu Sep 02, 2010 10:50 am    Post subject: Reply with quote

springbok wrote:
Ok I've finally been able to get debugging going manually for now at least, the steps I followed are...


Thanks for posting these steps. Unfortunately they don't work for me on OS X (although this was the first time I've seen NB not fail to install the fast debugger on its own). After going through these steps, when I attach the debugger it exits complaining that it can't find tmp/pids and etc/config.ru within my NetBeans install directory rather than in my Rails application. Not really sure why it thinks it's supposed to.

UPDATE: Ahh - it's because it looks in $CWD for this stuff, and that's where I happened to be sitting when I launched the debugger. Once I switched to my Rails app directory, this worked. Thanks a bunch!

BTW, in between tries I removed the debugger gems NB installed and went back to the hand-installed ruby-debug-ide19, and this still worked, so the removal of those gems and installation via NB might be unnecessary.
Back to top
gipnokote



Joined: 31 Aug 2010
Posts: 6

PostPosted: Thu Sep 02, 2010 1:29 pm    Post subject: Reply with quote

Thank you guys, will try it this evening and will write how it went!
Back to top
celeduc
Posted via mailing list.





PostPosted: Thu Sep 02, 2010 5:39 pm    Post subject: Cannot use Run, Debug, or Rails Console: NB 6.9.1 nightly and Rails beta Reply with quote

springbok-3 wrote:
Quote:


Sorry to bring this up again, but has anyone been able to get the debugger
working? I'm still having the same problem were it's trying to run
script/server instead of rails s. I can start the server in non-debug mode
without any problems after modifying the ruby 1.9.2. directories but I
just can't get the debugger going.

Thanks,
Etienne.

Hi Etienne, I have a partial solution for you. Just create a file named
"server" in your script directory with the following content:

#!/usr/bin/env ruby
system 'rails s'

then "chmod ogu+x server" ... now the debugger launches. I don't get
breakpoints, but I do get the debugger. That's something, right?
--
View this message in context: http://old.nabble.com/Cannot-use-Run%2C-Debug%2C-or-Rails-Console%3A-NB-6.9.1-nightly-and-Rails-beta-tp29544584p29601846.html
Sent from the NetBeans Ruby Users mailing list archive at Nabble.com.
Back to top
jimjames99



Joined: 10 Dec 2009
Posts: 3

PostPosted: Mon Sep 06, 2010 12:27 pm    Post subject: Reply with quote

Same problem. This is my home development machine.
nb 6.9.1 - not nightly
ruby 1.9.2-head
rails 3.0.0
ruby-debug-base19 (0.11.24)
ruby-debug-ide (0.4.9)
os x 10.6.4

patches didn't work for me.

rails fails to start with the error "Uncaught exception: no such file to load -- script/rails"

At work we use nb 6.9.1 (not nightly)
jruby 1.5.1
rails 2.5.3
correct debug gems
rails will start ok and the debugger will start but the debugger will not expand objects in the Variables pane (so you can see contents of hashes, arrays, etc).

It's making development hard!

Jim.
Back to top
bkocik



Joined: 03 Oct 2008
Posts: 26

PostPosted: Tue Sep 07, 2010 1:13 pm    Post subject: Reply with quote

jimjames99 wrote:
Same problem. This is my home development machine...
It's making development hard!


Hi Jim -

See Springbok's (Etienne) work-around above. It's working very well for me.

-Bill
Back to top
tiesel



Joined: 11 Nov 2010
Posts: 2

PostPosted: Thu Nov 11, 2010 2:59 pm    Post subject: Reply with quote

The problem is the missing path . in $:, so the scripts aren't found.
I inserted
$: << "."
before the load command in rdebug-ide (/usr/bin/rdebug-ide).
It fixed the problem.
(NetBeans 6.9.1, ruby 1.9.2p0 (2010-08-18) [x86_64-linux])
Back to top
leogrove



Joined: 14 Dec 2010
Posts: 1

PostPosted: Tue Dec 14, 2010 4:35 pm    Post subject: got it working like a charm Reply with quote

tiesel wrote:
The problem is the missing path . in $:, so the scripts aren't found.
I inserted
$: << "."
before the load command in rdebug-ide (/usr/bin/rdebug-ide).
It fixed the problem.
(NetBeans 6.9.1, ruby 1.9.2p0 (2010-08-1Cool [x86_64-linux])



This made everything work out fine, however I modified the rdebug-ide located at

/home/user/.rvm/rubies/ruby-1.9.2-p0/bin/rdebug-ide

I tried the /usr/bin location and that did not work for me.
Back to top
OnTrack



Joined: 20 Dec 2010
Posts: 1

PostPosted: Mon Dec 20, 2010 12:31 am    Post subject: Reply with quote

tiesel wrote:
The problem is the missing path . in $:, so the scripts aren't found.
I inserted
$: << "."
before the load command in rdebug-ide (/usr/bin/rdebug-ide).
It fixed the problem.
(NetBeans 6.9.1, ruby 1.9.2p0 (2010-08-1Cool [x86_64-linux])


Could you expound a bit on this like posting what the line in question looked like before & after the changes were made.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
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