Does Xcode 4 have support for rails projects? If so, to what extent?
UPDATE - Obviously it lets you edit text files. But does it give you any IDE features, e.g. syntax highlighting, navigation to declarations, code completion, etc... ?
Apple's Xcode Command Line Tools provide a C language compiler. You'll need it to install Ruby. Also, for many Ruby projects, you will need the C language compiler to automatically install gems that use native extensions (some gems speed up Ruby by using code written in C).
Recent versions of Mac OS X have Ruby and Rails installed by default, but you will need to upgrade to version 2.1. 4 of Ruby and version 4.1. 7 of Rails. To get started, you will need to install XCode, but note that you will NOT be developing in XCode, you just need to have it installed.
In the past Xcode releases many were able to use the Xcode IDE for non-apple projects such as PHP, Rails, etc.
All you had to do was open Xcode organiser and drag your project in there and it worked. Not so with Xcode 4, but the feature has not been removed but in fact improved in my opinion.
In Xcode 4, click File > New > New Workspace.
Give it a name and once on the main editor window simply drag and drop your Rails, PHP, etc project onto the project navigator.
Then you can choose Editor > Syntax Coloring > [Any] for syntax highlighting.
M.
I paid up to intall XCode 4 thinking that it would be simpler to consolidate all my development to a single IDE. XCode is the default because of the built in Mac API docs. I built a few MacRuby (0.10) samples, which parse and run.
Problems are:
There were workarounds for 1 and 5 in 3.2 for 1 and 5 but they no longer work with 4 as far as I can see.
On the plus side, the documentation interface to OSX and NextStep is very nice and MacRuby and the UI editor work well together and allow bundling desktop apps which can be distributed standalone or via the app store. I would use it to build ruby apps that use the desktop GUI.
For conventional web or scripting apps you can 'bare edit' rails projects in the 'Workspace' area and then skip to the terminal to run a server or use script/console to debug; but for this NetBeans is still far superior IMHO with in-code debugging and automated tests and workflow.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With