29 August 2006

Problems with RubyGems and Platform Specific Gems

Something that at least a few of us are annoyed with is the case where there is a ruby version, as well as a platform specific version of a gem. Good examples are mysql and mongrel, amongst others. I see a couple of issues here, but the crux of the issue is that this kills the ability to automate (non-interactively) installation.

First, why should the system even offer the win32 version of the gem to me if I'm not using a Windows machine? Fixing that would fix the problem for many people.

But, let's say you are doing multi-platform development, and in particular include in that Windows. I think RubyGems ought to be updated so that you can specify a platform variant when you install a gem, much as you can specify a version. This way, your automation script could simply specify the one it wanted, given the platform it was running on.

The other thing I'm wondering about is what solutions people have in terms of being able to freeze your gems, but where you have gems that have native code, and where you work on multiple platforms. This must be extremely common in the Rails world, where it seems the standard developers machine is MacOS X, and deployment servers are typically some UNIX flavor. Also, I've yet to try it, but I presume things don't behave well if you freeze gems on one platform and then go to another - I assume it freezes gems that include native code?

Anyone have solutions to these issues?

technorati tags: 

28 August 2006

WebORB for Rails: connectivity between Flex and Flash Remoting clients and Ruby on Rails

WebORB for Ruby on Rails | Flex RPC and Flash Remoting for Ruby on Rails

This is just really cool. Take a look at the page. It makes putting a Flex front end on your RoR apps really easy. What's nice is that it's an easy install, and then it exposes your Rails objects as Flex Data SErvices or Flash Remoting gateway, which means that it's the natural way for Flex or Flash to work with it. In the past I've connected Flex apps up to Rails apps via web services and JSON as the data transport. This works just fine, but it appears this will be a more direct and natural integration for Flex. Here's the diagram from their site:

WebORB diagram

technorati tags:, , , , ,

21 August 2006

Resizing hard drives in Parallels on Mac

Parallels is a very cool virtual machine system for Mac (and Windows and Linux). Particularly cool is the ability to resize the hard drive image you have for a given VM. But, the Parallels manual is not accurate on how to do this, or rather is missing some steps (maybe they don't intend for you to have to do this, but haven't finished this functionality?). A thread on their forum leads to the solution, but the thread is a bit jumbled and you need to put together the full solution. For ease, here's the step by step I used to make it work:

  1. Shutdown Parallels

  2. Run the "Image Tool" that comes with Parallels.

  3. Resize the disk you want (it needs to be an "expandable" disk, but Parallels makes them this way by default. If yours is not for some reason, read their manual on how to convert it to one).

  4. I did not bother making a backup of my image prior to this, but of course, standard cautions apply.

  5. Now, what Image Tool actually does, is just to make the disk bigger, it doesn't actually affect the change on your virtual disk volume.

  6. Go get the GPartEd LiveCD. You don't need to burn it to a CD.

  7. Now, start up Parallels, and do two things for your virtual machine:

    1. Change the boot order, so CDROM is first, and

    2. In the CD options, change it to use a disk image, and then go browse to the GPartEd Live CD ISO you just downloaded.

  8. Run the VM, which will boot into GPartEd. Accept all the default options.

  9. Once GPartEd is running, select the initial partition, and click the Resize toolbar button. In the resulting dialog, drag it to fill the additional space, hit OK; then Apply the changes. Shutdown GPartEd.

  10. Boot up your Parallels VM. If doing this for Windows, you'll see Windows do a chkdsk. Once booted, you'll see it say you have new devices and need to restart. This is fine, do so. Once it restarts and is back, you're good to go.

19 August 2006

Headed to Scale With Rails Workshop; and Interesting Rails Deployment Options

Next week I'm headed to the Scale with Rails workshop. I'm hoping this will be quite useful and interesting. It will also be cool to test out TextDrive's new container hosting setup. I've been doing a lot of investigation on VPS and similar systems lately. Also, another very intriguing setup will be the Engine Yard hosted setup. I've been talking to Tom there, and I like what I hear so far. Even cooler is that they are in Sacramento, so I plan to get together with them in the near future and discuss even more. Another non-traditional, much more supported VPS setup is Rails Machine. These are all quite appealing to anyone who wants to concentrate on development of their app, and leave the OS maintenance and related bits to someone else that may have more expertise in that area. For my personal setups, this is quite appealing.

technorati tags:, , , ,

18 August 2006

Using Non-CRUD Actions With Simply Restful Controllers

I've been making use of the simply restful integration in my Rails apps. However, one of the things that took a bit of digging to figure out, was how to map additional (non-CRUD) actions. If you try to simply use a URL of /controller/action that won't work, because it'll treat the action as an ID.

I came across this blog entry on Ryan's Scraps, which explained how to add more actions to the mix. That got me most of the way there. However, what happens if you want to support both GET and POST to an action? A good example of this is a login form. You want GET to show the form page, and POST to do a submit to the login action. As it turns out, you can do this easily with the following mapping:

map.resources :users, :new => { :login => :any }

For more good info, and more of a primer, on simply_restful, check out David Goodlad's post.

technorati tags:,

10 August 2006

Flash Player 9 for Intel Macs Now Available!

The release version of Flash Player 9 is now available for Intel Macs.  Run and get it.

technorati tags:

08 August 2006

Confluence vs. Basecamp

I've recently been using Basecamp for some project management.  It was working fairly well.  I can definitely see the value if you are a consulting firm or similar where you are manageing multiple clients/projects.  The main drawback relates to their claimed strength of simplicity.  Sometimes it's too simple.  I'd like to see multiple todo pages for one.  Also, my real complaint is speed.  Basecamp seems very slow to me, painfully slow at times. 

On a new project, we evaluated Basecamp vs. using a wiki and sort of doing it ourselves.  Due to various constraints our wiki choices were MediaWiki (which is what powers Wikipedia, and many more), or Confluence.  MediaWiki definitely came up short.  We have a range of people using this, from engineers to marketing folks.  Wiki's sometimes present stumbling blocks to those who prefer to write in more of a word processor environment.  Also, we really wanted a good task list system.  We tried the two task extensions for MediaWiki, but neither seemed to actually work properly.

I then setup Confluence.  It should be noted that it is not open source and has a significant price tag that may be a prohibitive factor for many (note to open source folks though that they have arrangements for that).  Setup was simple drop-in and run a startup script (as well as create a database in your DB engine of choice). 

I am impressed!  Confluence is a superb wiki!  I've used several other wikis over the last year or two (we use twiki heavily as well, and I've tried a half dozen others).  Confluence takes it up a notch.  It feels polished and professional, and it's been a joy to use.  Also, the less-technical folks are finding it a lot nicer to use as well.  And, their task extension (we're using the Enhanced Task List macro) is quite nice, perfect for what we're after (fitting our Scrum use).

Another thing I like is how it manages hierarchies of pages, and provides automatic lists of child pages at the bottom of a page.  This allows you to forgo linking when you don't need to.  Also, the mail features, and RSS abilities are well done.  So, I'm sold, and we're proceeding full steam ahead with Confluence.

technorati tags:, , ,