如何解决bundle update --conservative devise 不只更新“设计” gem
我最近尝试将设备更新到 gemfile 中指定的最新版本,而不影响其依赖项。
gemfile.lock:
const { pipeline } = require('stream')
async function downloadImagefromremote(url_immagine,filename) {
console.log('[2] Salvo l\'immagine remota in locale');
const downloadFile = (fileUrl,downloadFolder,filename) => {
return new Promise(async(resolve,reject) => {
// Get the file name
const fileName = path.basename(fileUrl);
// The path of the downloaded file on our machine
const localFilePath = path.resolve(__dirname,filename);
try {
const response = await axios({ // <----- here jump out
method: "GET",url: fileUrl,responseType: "stream",});
pipeline(
response.data,fs.createWriteStream(localFilePath),e => {
if(e) reject(e)
else resolve("Successfully downloaded file!")
}
)
} catch (err) {
reject(Error(err))
}
})
};
const IMAGE_URL = 'https://www.kindacode.com/wp-content/uploads/2021/01/test.jpg';
let rel_path = __dirname + '/../../public/images/';
try{
const confirmDownload = await downloadFile(IMAGE_URL,rel_path,filename);
console.log(confirmDownload)
} catch(e) {
console.log('catched err:',e)
}
}
在我运行 bundle update --conservative devise 之后:
gemfile.lock:
devise (3.5.3)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6,< 5)
responders
thread_safe (~> 0.1)
warden (~> 1.2.3)
thread_safe (0.3.5)
warden (1.2.4)
我知道只有“设计”gem 版本发生了变化,而不是依赖项,但更改其版本的 gems 也像 thread_safe 和 warder 也是设计的依赖项的一部分,但不在范围内。他们喜欢什么?为什么要改变他们的版本?
解决方法
在 github 上有一个未解决的问题。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。