添加 Amazon Simple Storage Service (aws-s3) 时 Heroku 应用程序崩溃
我的应用程序可以在 Heroku 上运行,直到我将“gem 'aws-s3', :require => 'aws/s3'”添加到 gemfile 中。 (我也只尝试过第一部分)。 一旦我添加此内容并尝试“heroku rake db:migrate”,我就会收到此错误
“rake 中止! 没有要加载的文件——rails/all /app/Rakefile:4"
它在我的本地服务器上与 aws s3 一起工作正常,在我更改 gemfile 之前在 heroku 上工作正常。
有什么想法吗?
编辑 这是整个 Gemfile
source 'http://rubygems.org'
gem 'rails'
gem 'devise'
gem 'omniauth'
gem 'nifty-generators'
gem 'paperclip'
gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'aws-s3'
group :development, :test do
gem 'rspec-rails'
gem 'annotate-models'
end
/edit
My app works on Heroku until I add "gem 'aws-s3', :require => 'aws/s3'" to the gemfile. (I've also tried it with only the first part).
As soon as I add this and try to "heroku rake db:migrate" I get this error
"rake aborted!
no such file to load -- rails/all
/app/Rakefile:4"
It works fine with aws s3 on my local server, and it works fine on heroku up until I change the gemfile.
Any ideas?
edit
Here is the whole Gemfile
source 'http://rubygems.org'
gem 'rails'
gem 'devise'
gem 'omniauth'
gem 'nifty-generators'
gem 'paperclip'
gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'aws-s3'
group :development, :test do
gem 'rspec-rails'
gem 'annotate-models'
end
/edit
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这听起来很模糊,但我记得需要指定我正在使用的 aws-s3 的版本,以便让 S3 在我的一个 Heroku 应用程序上正常工作。可能值得尝试:
不要忘记:
更改 gemfile 后。
抱歉,我一直在绞尽脑汁地想知道我在哪里读到这篇文章以支持它,但值得一试。
This is going to sound vague but i remember something about needing to specify the version of aws-s3 that i was using in order to get S3 to work properly on one of my Heroku apps. It might be worth trying:
Don't forget to:
after changing your gemfile.
Sorry, been trying to rack my brain as to where i read this so as to back it up, worth a try though.