Tuesday, November 23, 2010

Configuring Aptana to Treat Gemfiles as Ruby Files

Aptana Studio 2 does not recognize Gemfiles used by Bundler as Ruby files. This means that Aptana will treat the Gemfile you are editing as an ordinary plain text file. You will not have Ruby syntax highlighting, word completion, and syntax checking available within the editor. In order to specify that the Gemfile (or any other file for that matter) is a Ruby file, do the following:
  1. Open the "Window Menu" --> Preferences
  2. Go to General --> "Content Types"
  3. Expand "Text" node under "Content types"
  4. Select "Ruby Source File"
  5. Click the "Add..." button and enter "Gemfile" as the content type.
  6. Click the "OK" button to save your changes.



The above procedure can be used to add files for the following content types:
  • CSS Source Files
  • ERB Source Files
  • HAML Source Files
  • HTML Source Files
  • JAR Manifest Files
  • Java Property Files
  • Java Source Files
  • JavaScript Source Files
  • SASS Source Files
  • XML Build Files (Ant, etc)
  • XML Source Files (xml, xslt, etc)