开发者

Amazon S3 AWS + Texticle search on Heroku

I'm using Texticle to do full-text search on Heroku. It's working great.

I'm now trying to setup nightly db backups to Amazon s3 using this script.

When I try heroku rake backups:backup I first get this error:

/disk1/home/slugs/245176_566b3d9_4845/mnt/.bundle/gems/bundler/gems/texticle-3a96c70a9fa60921197f0027204a23824435b142-ee972fc2f8f84e6faf323a9a5580dca475ea98d9/lib/texticle.rb:52: warning: already initialized constant VERSION

From that point it goes ahead and runs the rest of the rake task:

backup started @ Fri Jul 30 02:30:00 -0700 2010
dumping sql file..
gzipping sql file...
uplo开发者_StackOverflow中文版ading my-app_20100730023000.sql.gz to S3...

But looking in S3 shows that it didn't actually upload anything.

Looks like texticle's VERSION constant is interfering with the amazon gem. I've also tried to use the right_aws gem but I get the exact same error.

Anyone have any suggestions on how to get this going?


That warning is fairly common due to people not handling namespacing correctly. Generally it is harmless.

I'd look for other reasons your S3 upload is not working. Are the credentials correct? Does the bucket you're trying to upload to exist?


So the problem was actually in the fact that I wasn't specifying the :require => 'aws/s3' after declaring the gem in the Gemfile. It's working fine now. Strange though is that now I've switched to the right_aws gem and the problem (which used to affect that gem as well) seems to have gone away even though you don't have to specify the :require with right_aws. Anyone have ideas on that?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜