Does anyone have a clue as to how to download Edge Rails and package it as a Gem for easy install? Right now I have my svn repo setup with an external link to Edge Rails but ideally I’d like to be able to create a gem from Edge Rails and install that. Any help is appreciated.
Archive for the ‘Ruby on Rails’ Category
Packaging Edge Rails as a Gem?
Thursday, August 3rd, 2006Cerberus on Windows
Wednesday, July 26th, 2006Just a quick one before a longer “Rails Continuous Integration” post but if you are trying to get Cerberus to work on Windows then after the gem install you have to set an environment variable yourself. Create one called CERBERUS_HOME with a value of C:\ruby\lib\ruby\gems\1.8\gems\cerberus-0.1.1
YAML and JSON
Tuesday, July 18th, 2006In JSON on the Web, or: The Revenge of SML Simon talks about the growing use of JSON and YAML in competition to XML. Having used all three I have to say I like JSON a good deal more than YAML while XML is still useful. YAML actually really bugs me and I often stumble over its rigid formatting. I’d prefer Rails to use straight Ruby for it’s config files.
Simon says:
It also had the advantage of building right on an existing programming language, JavaScript, and could easily describe itself as JavaScript Object Notation (JSON).
Which is very true. It is lovely to use and requires no new concepts to learn.
Look at the JSON carefully!
It’s a subset of YAML, as it turns out. Well, not a perfect subset at first, but with the departure of JavaScript comments, it’s very close.
Technically yes but in practice not at all. YAML often trips me up when a text editor puts in a tab instead of a space or a value contains a colon or you have two blocks with the same name but different values. JSON just works nicely and you can format and align it pretty much anyway that suits your coding style.
I definitley see a good future for JSON but hope that YAML remains a config file language at most.
Serve webrick
Thursday, June 22nd, 2006I wasn’t sure this was going to work but fantastically it does. Maybe I am ignorant but I think this is pretty handy.
You are working on a local Ruby on Rails app and you have your local webrick server running. Now you want to show your team mate your local copy but on their machine and in their browser.
Normally you run Webrick with ruby script/server and that fires up a server on http://127.0.0.1:3000/.
But to share it with your mate that won’t work (127.0.0.1 is localhost and peculiar to your machine.) Instead you can simply run Webrick like so; ruby script/server -b machinename (where machinename is your computer’s network name.) That will then make your Rails app available to your team mate on http://machinename:3000/. You can put in an IP address instead of a name if you want.
Handy.
RIDE-ME
Tuesday, June 13th, 2006
RIDE-ME is a neat Windows IDE for Ruby on Rails that will be very familiar to Visual Studio users. It is a good deal faster than RadRails and works more as I expect (coming from a Visual Studio background.)
I also have to say the developers are very responsive. I posted two tickets and within an hour they had been resolved and the code made available. This is the first time I have commented on an open-source project, had a response, downloaded the patched code and then used it properly as an app. Normally I wait for official releases and avoid the bleeding-edge trunk. This way works nicely though.
So well done to the RIDE-ME lads so far. Looking forward to the features they have planned and I hope I can contribute some more to the project.
controller_name
Thursday, May 18th, 2006controller.controller_name
That is a useful bit of Rails code for when you need to know what controller is being used in a view.
Dynamic is hot
Friday, May 12th, 2006Oh one just has to adore the dynamic nature of Ruby coupled with the thoughtfulness of Rails.
I have a Feedtag object which has feed_id and tag_id members. Naturally with Rails you get to be able to find records using Feedtag.find_by_tag_id and Feedtag.find_by_feed_id. But what if you wanted to use both Ids to find a record?
No problem. Just use Feedtag.find_by_tag_id_and_feed_id. It is a bit of a mouthful but it works. No extra code, no SQL strings, just a bit of beautiful dynamic code.
Steel and Rails
Wednesday, May 10th, 2006Sapphire In Steel is an add-in for Visual Studio that provides Ruby syntax highlighting, debugging, project running and so on. Pretty much what you expect in your VS IDE.
Sadly it doesn’t work with Rails projects. I can’t seem to import a Rails folder/file structure and start editing.
I really want that. I’d love to be able to code Rails apps in the VS IDE. RadRails is a decent IDE but it has some way to go (I especially get frustrated with its code-editor. It needs the polish that VS has.)
So the moment Sapphire In Steel adds Rails support I’ll be a happy geek.
Scale with rails logo variation
Wednesday, May 3rd, 2006The Scale With Rails events in New York, California and Frankfurt look good. Serious, low-level advice on running high-scale Rails apps from the application/code level through to your data-center and what plugs to use. At $1399 they aren’t cheap but each event is for just 50 people.
