开发者

How do (or can I) hack a gem temporarily while looking for a bug?

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 throug开发者_StackOverflowh 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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜