Project: aptanastudio
Issue APSTUD-3435: Show better error messages when invoking a command without the proper Ruby gem Installed
If the end user invokes the command "Convert HTML to HAML" without the appropriate Ruby Gem installed, Aptana returns an error via the scripting console. Steps to Replicate : 1) Open Aptana Studio 2) Open a saved HAML file 3) Invoke the command Commands > HAML > Convert HTML to HAML Actual Results : The editor returns this message to the scripting console : {noformat} [2011-09-08 15:47:22] An error occurred while processing the invoke block for the command Convert HTML to HAML in /home/qatester/Desktop/newest/configuration/org.eclipse.osgi/bundles/357/1/.cp/bundles/haml.ruble/commands/convert_html_to_haml.rb: (Errno::EPIPE) Broken pipe org.jruby.exceptions.RaiseException: (Errno::EPIPE) Broken pipe org.jruby.RubyIO.write(org/jruby/RubyIO.java:1330) org.jruby.RubyIO.<<(org/jruby/RubyIO.java:1476) #.define_command(/home/qatester/Desktop/newest/configuration/org.eclipse.osgi/bundles/357/1/.cp/bundles/haml.ruble/commands/convert_html_to_haml.rb:10) org.jruby.RubyIO.popen(org/jruby/RubyIO.java:3529) #.define_command(/home/qatester/Desktop/newest/configuration/org.eclipse.osgi/bundles/357/1/.cp/bundles/haml.ruble/commands/convert_html_to_haml.rb:9) org.jruby.RubyProc.call(org/jruby/RubyProc.java:268) org.jruby.RubyProc.call(org/jruby/RubyProc.java:232) {noformat} Expected Result : The editor could return a concise error message. Suggested approach is to add a function which can be called before running the ruby command that will check for the existence of the specified gem. If the gem is missing, it will alert the user, ideally with directions on how to install the gem. We would then need to update existing commands where appropriate (approximately 10).
Story points: 13