小编Nij*_*shy的帖子

如何在 AWS Opsworks 中升级 Ruby Bundle 版本

我有一个在 AWS Opsworks 上运行的项目,它在Ruby 2.2.2上具有当前的捆绑程序版本1.5.3

我想将捆绑版本升级到1.17.3

但是当我尝试这样做时,我收到此错误

Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /usr/local/bin/gem install bundler -q --no-rdoc --no-ri -v "1.11.2" ----
STDOUT: 
STDERR: ERROR:  Error installing bundler:
"bundle" from bundler conflicts with /usr/local/bin/bundle
---- End output of /usr/local/bin/gem install bundler -q --no-rdoc --no-ri -v "1.11.2" ----
Ran /usr/local/bin/gem install bundler -q --no-rdoc --no-ri -v "1.11.2" returned 1


Resource Declaration:
---------------------
# In /var/lib/aws/opsworks/cache.stage2/cookbooks/opsworks_bundler/recipes/default.rb

2:   gem_package …
Run Code Online (Sandbox Code Playgroud)

ruby ruby-on-rails amazon-web-services bundler aws-opsworks

6
推荐指数
1
解决办法
385
查看次数

Antd 弹出窗口根据操作执行的顺序以两种不同的宽度打开

抱歉,如果标题令人困惑,我不知道还能用什么语言来表达。

我目前正在学习 React 并使用antd UI 组件制作了这个应用程序。我有这个功能,可以在购物车中添加和删除商品。

我正在使用弹出窗口来列出购物车项目,一旦它们被添加到购物车。弹出窗口以两种不同的宽度打开,具体取决于我在应用程序中执行操作的顺序。

如果我在向购物车添加任何东西之前打开购物车,则购物车会在狭窄的容器中打开,购物车中没有任何内容。如果我之后添加任何东西到购物车。那么购物车就会变得很窄,无法正确容纳所有东西。

在此输入图像描述

现在重新加载页面

在打开弹出窗口之前将商品添加到购物车。现在您可以看到弹出框更宽,可以正确容纳所有内容。

正确的

我该如何解决这个问题?

可重现的示例:代码沙箱链接

github:https: //github.com/nijeesh4all/reactShopping

html javascript popover reactjs antd

5
推荐指数
2
解决办法
8449
查看次数

在活动邮件程序 smtp 设置中使用 `:plain` 与 `:login` 有什么区别?

在活动邮件程序 smtp 设置中使用:plainvs作为身份验证有什么区别?:login

清楚的

ActionMailer::Base.smtp_settings = {
    :address        => 'smtp.sendgrid.net',
    :port           => '587',
    :authentication => :plain,
    :user_name      => ENV['SENDGRID_USERNAME'],
    :password       => ENV['SENDGRID_PASSWORD'],
    :domain         => 'heroku.com',
    :enable_starttls_auto => true
  }
Run Code Online (Sandbox Code Playgroud)

登录

ActionMailer::Base.smtp_settings = {
        :address        => 'smtp.sendgrid.net',
        :port           => '587',
        :authentication => :login,
        :user_name      => ENV['SENDGRID_USERNAME'],
        :password       => ENV['SENDGRID_PASSWORD'],
        :domain         => 'heroku.com',
        :enable_starttls_auto => true
      }
Run Code Online (Sandbox Code Playgroud)

在关于配置 smpt 设置(特别是发送网格)的不同教程中,我已经看到它们被使用。

他们似乎都在工作,那么这两者有什么区别呢?推荐哪一种?为什么?

我打算:plain使用base64编码来混淆凭据,那么这是最安全的吗?

smtp ruby-on-rails actionmailer

4
推荐指数
1
解决办法
6198
查看次数