我以前在我的Gemfile中有gem 'aws-sdk'
,但是将其更新为gem 'aws-sdk-s3'
以防止不必要的包加载。虽然这在我的本地计算机上工作正常,但heroku应用程序崩溃时出现以下错误:
cannot load such file -- aws-sdk (You may need to install the aws-sdk gem))
将我的新应用程序上传到Heroku时,我收到以下警告,但Heroku上的链接对采取的操作毫无意义:
remote: ! Warning: You are running on a deprecated stack.
remote: ! Please upgrade to the latest stack by following the instructions on:
remote: ! https://devcenter.heroku.com/articles/upgrading-to-the-latest-stack
非常感谢帮助,谢谢!
答案 0 :(得分:2)
它在本地工作,因为您安装了aws-sdk
gem。它不在服务器上,因为Gemfile中缺少它。将其添加到您的Gemfile
:
gem "aws-sdk"
然后运行bundle
并提交Gemfile
和Gemfile.lock
关于堆栈,升级很简单https://devcenter.heroku.com/articles/upgrading-to-the-latest-stack#upgrading-an-app