about 1 month ago - No comments
I’ve just completed migrating a client site from BackgrounDRb to delayed_job (which is a huge relief on several levels). I had hoped to complete the process this morning, but the delayed_job process kept dying on me without any apparent explanation in the usual logs. Thankfully the RPM log in my app turned out to be More >
about 3 months ago - No comments
In a lengthy blog post detailing many of the intricacies and some of the politics relating to character encodings in Ruby, Yehuda Katz has a few paragraphs that left me more than a little excited: The most common scenario where you can see this issue is when the user pastes in content from Microsoft Word, More >
about 3 months ago - 2 comments
I’m gradually porting a number of my older Rails apps over to Rails 3. The main motivation is a chance to really put the new version through its paces, get a better sense of how it’s working, where plugins are at, etc; but it’s also rather nice to get some of the performance improvements and More >
about 3 months ago - No comments
I stumbled across James Herdman’s piece on asset bundling in rails earlier this week. I’d always presumed you could do this but never got round to investigating as very few of my projects load in very large numbers of JS/CSS assets. In the end it was quite timely as I’ve been trying to reduce the More >
about 4 months ago - 2 comments
If you’re anything like me, you’ve found the rails server and console taking longer and longer to launch lately. Even switching to Rails 3 for most active projects hasn’t really helped. But I finally found a solution a couple of weeks ago. I found it reading Mikel Lindsaar’s Bundle Me Some Sanity where he outlines More >
about 8 months ago - Comments Off
This is a follow-on from my piece on how I got the (development version of) Catapult Magazine up and running with Rails 3.0pre. If you haven’t already done so, I’d recommend you read that first. Catapult makes use of the permalink_fu plugin which fails in Rails 3. It fails because of a reliance on the More >
about 8 months ago - 1 comment
I used to be a strong adherent to tracking edge rails. Up until the release of rails 2.3 I let most of my frequently updated projects track edge with a vendored copy of rails, and it rarely caused me any trouble. When 2.3 hit I rethought all that. With Rails 3 development ramping up I More >
about 1 year ago - Comments Off
I’m up to my usual using-ruby-tools-to-test-other-environments tricks, using cucumber and my wordpress activerecord classes to do acceptance testing against a highly-customised wordpress install. I’m hoping to write a bit more about that soon, once I’ve put it through its paces a little more and cleaned up some of the code, but I wanted to quickly More >
about 1 year ago - Comments Off
As mentioned in yesterday’s announcement I’m pulling some content across from this blog (running on wordpress) into the new Ket Lai site (a merb app). I’ve found myself doing similar things a few times lately, such as on Only Connect (on which more, soon) and so have built out a selection of ActiveRecord models to More >
about 2 years ago
This plugin looks interesting and just what I’m after for a current project. Sadly the svn repository is inaccessible, I’m asked for a login and password.
Is this a glitch, or is the code no longer available?
Thanks
Steve
about 2 years ago
Sorry Steve. I’ve been moving to a new server and a few things aren’t yet configured as they should be. I’ll try and get onto that first thing tomorrow.
about 2 years ago
This sounds like it’d be a great plugin. As soon as the svn repo is accessible, I’ll be downloading it.
The repo is asking for HTTP Basic creds. Is there an anonymous account perhaps?
about 2 years ago
Sorry about that. Anonymous access should be working now.
about 2 years ago
Hi James,
In the example you showed how to get the author, title, isbn, publisher and pubdate attributes of a book.
I want to get other attributes but don’t know what values to use to gat that data. Specifically I want the image of the book cover. How do I get that information?
about 2 years ago
Ben – The mapping is between the attribute names in Amazon’s Associate web services (previously E-commerce services) return values and the value you want it to be in your model.
I believe the URL for a small image is in the smallimage attribute (but I may well be wrong as it’s a while since I looked at the API) so in that case you’d use:
maps_to_amazon_attribute :image_url => ‘smallimage’
Let me know how you get on. It’s been quite a while since I last worked with the plugin so it may well be due an overhaul.
about 2 years ago
Hi James, thanks for posting this plug-in It looks like its exactly what I need.
I’m new to Ruby and have not used the Amazon Associate Web Services before.
Like Ben, my interest is in books. Users will enter ISBN, or title, or author, and I want to get back the balance of the info about a book including the cover thumbnail.
I’m reading this http://docs.amazonwebservices.com/AWSECommerceService/2008-03-03/GSG/
(given that I am noob :)) I am wondering where all that SETUP stuff is done in the case of your plugin (where keys are passed, etc)?
Thanks.
about 2 years ago
roupen – at the moment those values aren’t configured anywhere, so you need to pass them into each method call:
Model.load_from_amazon(asin_value, dev_key, associates_id)
At some point I hope to rework the plugin to use the amazon-ecs gem (since that supports ECS 4) and at that point I aim to make this configurable to DRY up code. Since I don’t currently use this plugin in any active projects, it’s taking a while to get to the new version, but hopefully with time…
about 2 years ago
Hi, I’ve been trying to get the example working but I get an error from the amazon lib, any ideas?
Book.load_from_amazon(’0439785960′, ‘xxxxxxxxxxxx’)
Amazon::Search::Request::HTTPError: HTTP response code 410
from /opt/local/lib/ruby/site_ruby/1.8/amazon/search.rb:991:in `get_page’
from /opt/local/lib/ruby/site_ruby/1.8/amazon/search.rb:1013:in `search’
from /opt/local/lib/ruby/site_ruby/1.8/amazon/search.rb:647:in `asin_search’
from /home/dbc602e2/fbpoc/vendor/plugins/loads_from_amazon/lib/loads_from_amazon.rb:65:in `load_from_amazon’
from (irb):30
about 2 years ago
albemuth – it’s been quite a while since I used the plugin since the project I created it for is long since defunct. As I understand it the amazon ECS library I built it on top of isn’t maintained any more so it could well be using a version of the API that amazon no longer support.
As mentioned above, if/when time allows I’d love to port it to use the amazon-ecs gem but I’m very busy at the moment so there’s no telling when I’ll get to it. It’s probably not a huge amount of work, so you might like to check out the gem and see whether you can hack it together?