In this screencast, Komodo developer Eric Promislow will walk you through the new Rails-specific features in Komodo 4.1 by demonstrating how to quickly build an application in Rails.
I'm still learning about deployment, which is obviously done on a remote machine. I'd rather run tests remotely than fire up the debugger. You could use Komodo to remotely debug a remote Rails app, but you'd have to configure the remote app first -- see
Let's assume you're running Komodo on a Windows box called "buckley.acme.com".
Go into Preferences|Debugger|Connection and have it listen on the
specific port 9000, or whatever port is handy. Make sure
the menu item Debug|Listen for Debugging Connections is checked.
On the Linux box, move to the directory containing the file rdbgp.rb,
the main Komodo Ruby debugger file. Run this shell command:
% rdbg=`pwd`
The only reason to do this is because that path is often very
long. We need to type that path twice, in the next command,
so typing four characters going to be easier to read. If you're
going to do this kind of debugging often you might as well give
the variable a more meaningful name and set it in your profile.
Now move to the directory containing your Ruby script, and run
these commands:
Here's what I have done (I hope this helps others):
Copied the dbgp folder from C:\Program Files\ActiveState Komodo IDE 4\lib\support\dbgp to my Linux home directory ~/Komodo/dbgp/
Downloaded the Komodo-PythonRemoteDebugging package and overwrote ~/Komodo/dbgp/bin and ~/Komodo/dbgp from that package (it also put some files in ~/Komodo/)
Made sure port 9000 was set in Preferences>Debugger>Connection
Ran export RUBYDB_OPTS=remoteport=my.domain.com:9000 in my rails application folder
Ran ruby -I/home/username/komodo/dbgp/rubylib/ -r /home/username/komodo/dbgp/rubylib/rdbgp.rb script/server in my rails application folder
Ran sudo gem install ruby-debug-base as per the below error message suggests
I still get the error:
Error: /home/username/komodo/dbgp/rubylib/1.8/ruby_debug.so: invalid ELF header - /home/username/komodo/dbgp/rubylib/1.8/ruby_debug.so
The Komodo ruby debugger couldn't load the ruby-debug-base component.
This library ships with Komodo, but also can be installed by running `gem install ruby-debug-base'
The documentation isn't really clear what to do with the Komodo-PythonRemoteDebugging package once you download it, so I guessed.
Thanks for your help in advance. Oh, and you didn't say whether this would allow new ruby projects to be generated remotely (as the tutorial demonstrates) using rails .
[komodo-install-dir]/.../support/dbgp/rubylib
rdbgp.rb
rdbgp/
1.8/ *** Optional -- should be installed with 'gem install ruby-debug-base'
Since you copied the above directory from a Windows machine to a Linux one,
you can't use the binary libraries in the 1.8/ directory -- they were
built for Windows only. Please delete the whole 1.8 directory on your Linux machine.
Then follow the instructions in
[Help|Debugging|Debugging Ruby|Debugging Ruby Remotely]
Generating Ruby projects remotely is way beyond the scope of the tutorial and screencasts I've done. Why not build and develop them locally, and deploy remotely?
In case you were curious before launching.
I have not played with Ruby yet .. I will definitely be taking a look after watching the screencast.
plz provide any useful snippets, macros you might have created for your screencast...
maybe some of them are good for general use
------edited------
yes, i found them in the IDE, however one's own snippets are 'handier' rather than default...
I don't recall using any custom snippets or macros in the screencast,
just the ones that come with the Ruby on Rails Project Template.
I actually used more snippets and macros in the thirty minute version
of that screencast, which for obvious reasons we scrapped.
Would a screencast on snippets and macros alone be useful?
Hey eric nice job on the video (am still watching),
As I try to follow along I am curious to see how this would work with a remote environment (over SSH ideally so that the rails scripts can be run).
Any insite as to how to go about this?
I'm still learning about deployment, which is obviously done on a remote machine. I'd rather run tests remotely than fire up the debugger. You could use Komodo to remotely debug a remote Rails app, but you'd have to configure the remote app first -- see
Help|Debugging|Debugging Ruby|Debugging Ruby Remotely
for an idea of how to go about this.
All of what is in the help file is pretty much greek because it doesn't explain what exactly you are installing...
So, I got to "install Komodo-PythonRemoteDebugging" and then thought, how in the world is it going to know how to connect to the server with SSH?
Plus, all I am interested in right now is the scripts... does the debugger even do this (like how komodo will run > rails project_name <?
This is untested, but here's how I would do it:
Let's assume you're running Komodo on a Windows box called "buckley.acme.com".
Go into Preferences|Debugger|Connection and have it listen on the
specific port 9000, or whatever port is handy. Make sure
the menu item Debug|Listen for Debugging Connections is checked.
On the Linux box, move to the directory containing the file rdbgp.rb,
the main Komodo Ruby debugger file. Run this shell command:
The only reason to do this is because that path is often very
long. We need to type that path twice, in the next command,
so typing four characters going to be easier to read. If you're
going to do this kind of debugging often you might as well give
the variable a more meaningful name and set it in your profile.
Now move to the directory containing your Ruby script, and run
these commands:
That should do it.
Here's what I have done (I hope this helps others):
export RUBYDB_OPTS=remoteport=my.domain.com:9000in my rails application folderruby -I/home/username/komodo/dbgp/rubylib/ -r /home/username/komodo/dbgp/rubylib/rdbgp.rb script/serverin my rails application foldersudo gem install ruby-debug-baseas per the below error message suggestsI still get the error:
The documentation isn't really clear what to do with the Komodo-PythonRemoteDebugging package once you download it, so I guessed.
Thanks for your help in advance. Oh, and you didn't say whether this would allow new ruby projects to be generated remotely (as the tutorial demonstrates) using rails .
For Ruby debugging, you only need these files:
Since you copied the above directory from a Windows machine to a Linux one,
you can't use the binary libraries in the 1.8/ directory -- they were
built for Windows only. Please delete the whole 1.8 directory on your Linux machine.
Then follow the instructions in
[Help|Debugging|Debugging Ruby|Debugging Ruby Remotely]
Generating Ruby projects remotely is way beyond the scope of the tutorial and screencasts I've done. Why not build and develop them locally, and deploy remotely?
Regards,
Eric
Mainly because I develop on many different machines.