How to debug ruby on rails in eclipse aptana plugin
Issue the following command from the command line:
gem install ruby-debug-ide
The error message is saying that you don't have this gem installed. It seems as though Aptana does not check to see what gems are installed before activating certain features.
In case you don't know what a gem is, think of it as a plugin that is installed system-wide.
How to debug ruby tests in Eclipse/Aptana Studio?
For a normal ruby file, right click on it and select Debug As > Ruby application.
If your test is a rails one that requires some setup, or you want to debug the whole suite, you'll need to generate a debug configuration manually (or edit one manually).
Run > Debug As > Debug configurations... Then add an entry under Ruby application. Point it at your rake script path (say /usr/local/bin/rake
) as the file to launch and then edit the arguments to pass in your app's Rakefile as the first arg and the rake task as the second arg. (i.e. /my/path/to/project/Rakefile tests
)
Aptana plugin Debug rails project
I was having the same issue with Ubuntu 12.04, and did 2 things:
1- Sent an e-mail asking for help.
2- Install RubyMine
On both results the issue is some gems that are missing.
linecache19 (0.5.13 from http://rubyforge.org/frs/?group_id=8883&release_id=46302)
ruby-debug-base19x (gem install ruby-debug-base19x --pre)
ruby-debug-ide (gem install ruby-debug-ide --pre)
Thanks to Denis Usahkov for the help :D
How to configure aptana for instant running of my script
I don't think you have to change the default hot keys.
Answer to your Q1: You have to config your Aptana IDE to know your Rails project. please refer ror_master's link.
Answer to your Q2: alt + shift + x , then press 1 of the listed options ( t, x, etc)
Answer to your Q3: Your demand is not a good practice, I think. Make sure that you have to MANUALLY save all the files before you do any operations like running a unit test. Please make it as a habit.
Further more, it seems that you are using linux OS like ubuntu? If so, please forget Aptana or other IDEs, VIM + console will satisfy you, and by using these basic tools, you will be more clear of what you are running and the necessary environment knowledge of deploying & running Rails application.
I have 3.5 years of Eclipse and 1 year of Aptana experience, and yes, they are both great IDEs (almost the same), however, about 1 year ago I turn to VIM, which saved my life.
UPDATED: thanks for the so much bonus scores! Here are more tips for you:
whatever you are using ( Aptana, Eclipse, Netbeans, VIM) , do remember that the HOTKEY is important.
in Apatana/Eclipse, you should know these keys:
- quick open file: ctrl + shift + r
- quick open in recent file: ctrl + e
- method outline: ctrl + o
- switch : ctrl + F6 , ctrl + F7
- inspect a method from the statement where it was called: (move the cursor to it then press) F3, or press ctrl key then left click your mouse.
- in Apatana for Rails:
- ctrl + shift + c : quick jump to controller
- ctrl + shift + v : quick jump to view
- ctrl + shift + m : quick jump to model
VIM has a steep learning curve for us, in my experience, the first 2 weeks is the hardest time. Remember google is your best teacher. and here are the VIM plugins that I am using:
- autocomplpop
- fuzzy_file_finder
- greplace
- mru
- nerdcommenter
- project
- rails
this article is worth reading: Using VIM as a complete ruby on rails IDE
Eclipse users: Do you use Aptana too?
I have Aptana and Eclipse, but keep them separate since I do a lot of Java programming too. If you have one Eclipse with everything combined, then it turns into a bit of a memory hog (More so than usual) and takes too long to start up. Also, Aptana seems to thrust newsletters at you on startup, so if you use Eclipse for things other than Aptana-stuff, then this is another reason to keep it separate coz it gets a bit annoying after a while.
Related Topics
Should I Learn MACruby or Rubycocoa
Bundler Puts My Gems in My Project Directory
Cannot Load Such File - Rubygems.Rb
Firebase Token Error, "The Custom Token Corresponds to a Different Audience."
Clarification on the Ruby << Operator
Constants or Class Variables in Ruby
How to Iterate Through an Array Starting from the Last Element? (Ruby)
Connecting Using Https to a Server with a Certificate Signed by a Ca I Created
Rails 4.1 Mailer Previews and Devise Custom Emails
Testing After_Commit with Rspec and Mocking
Ruby on Rails - Differentiating Plural VS Singular Resource in a Rest API
Why Isn't My Cocoapods Post_Install Hook Updating My Preprocessor MACros
Retrieve Contents of Url as String
How to Use Nokogiri::Xml::Reader to Parse Large Xml Files