views:

302

answers:

2

Ok so I'm trying to get Refinerycms working with Heroku, and I'm new at all of this. I've set up an amazon s3 account and added keys and ids to the amazon_s3.yml files.

When launched on Heroku at gart.heroku.com I get the following error:

App failed to start

/disk1/home/slugs/141557_e8490b3_d5eb/mnt/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/s3_backend.rb:187:in read': No such file or directory - /disk1/home/slugs/141557_e8490b3_d5eb/mnt/config/amazon_s3.yml (Errno::ENOENT) from /disk1/home/slugs/141557_e8490b3_d5eb/mnt/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/s3_backend.rb:187:inincluded' from /disk1/home/slugs/141557_e8490b3_d5eb/mnt/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:123:in include' from /disk1/home/slugs/141557_e8490b3_d5eb/mnt/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:123:inhas_attachment' from /disk1/home/slugs/141557_e8490b3_d5eb/mnt/app/models/image.rb:13 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in require' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:265:inrequire_or_load' ... 42 levels... from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in instance_eval' from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:ininitialize' from /home/heroku_rack/heroku.ru:1:in `new' from /home/heroku_rack/heroku.ru:1

The s3_backend.rb line 187 contains:

@@s3_config = @@s3_config = YAML.load(ERB.new(File.read(@@s3_config_path)).result)[RAILS_ENV].symbolize_keys

Any help would be great!

A: 

Firstly check that your amazon_s3.yml file is checked in to git, if it is then you could try manually specifying the location somehow. If the class in s3_backend.rb has a way to set the path, you could do something like this:

S3Backend.s3_config_path = #{RAILS_ROOT}/config/amazon_s3.yml"

I'd recommend putting that in an initializer.

jonnii
Jonnii, thanks for the answer, I had a look at this but it was still causing the same problem. I could run the app locally but not on Heroku. The problem was that my rails gem (I thought) was updated to v 2.3.5 but the application was created somehow by v 2.2.3, there was some incompatibility between the two versions. It was unusual so I have since overhauled my entire development environment, I don't think I set it up correctly anyway, (noob at Linux). I'll give the heads up when I attempt to redeploy a new app.
John Deely
A: 

Perhaps amazon_s3.yml is in you .gitignore file?

(also, please retag this question with refinerycms)

stevenheidel