views:

48

answers:

2

I have a gem installed in my home directory on a laptop (eg not THE server). I have installed ruby 1.9.1 and also some other gems, notably right_aws - which allows access to s3, etc with ruby.

All works, except there is a bug when I do a query on SimpleDB, and the returned list of items includes an item with any two byte utf-8 character in its itemName().

So I look through the sources of the right_aws gem installed on my machine, and I can see some places where I would like to test a fix. If I edit the file, save changes, (needing a password), then restart the server (script/server), it ignores my changes.

I am quite new at ruby - do you have to 'compile' or other similar move to get the source code changes made take effect?

I can see the edited file is changed by viewing it in terminal, etc.

+1  A: 

Install it as a plugin. Then you can change the source in vendor/plugins and go back to the gem version later when it's fixed.

glebm
Thanks for the tip. I guess if I did not do this, I could just gem uninstall it, then re - install it. --Tom
Tom Andersen
+3  A: 

Are you sure you're editing the version that you're application is picking up? If you're using Bundler it'll download it into a seperate folder (hidden in your home directory). If not check using gem which right_aws. Make sure the file you're editing is the same as the one reported by that.

Ceilingfish
I think that I understand - If i edit the gem .rb files it should affect the app, as long as I hit the right ones. I know that there were two sets of them on my machine, so that explains it. I was also wondering if gems were somehow partially compiled, etc - but this means they are not.
Tom Andersen
oh and thanks too.
Tom Andersen