标签: amazon

RoR:无法将回形针连接到Amazon S3

我决定将我的应用程序部署到Heroku,我正在关注他们的教程.但是,我现在尝试使用回形针插件连接到我的Amazon S3存储桶,我收到此错误:

Images#index中的ArgumentError

显示第19行引发的app/views/images/index.html.erb:

第0行,第39栏的语法错误:`bucket:(MY BUCKET HERE)
access_key_id :(我的访问密钥ID在这里)
secret_access_key :(我的秘密访问密钥在这里)
'
提取的来源(第19行附近):

16:<%= H image.created_at%>
17:<%= H image.updated_at%>
18:
19:<%如果image.img.exists?然后%>
20:

<%= image_tag image.img.url(:thumb)%>


21:<%else%>
22:

没有附上照片,上传一张.

RAILS_ROOT:C:/ Users/Mariusz/Sites/wiw_development

应用程序跟踪| 框架跟踪| 完整跟踪
C:/Ruby/lib/ruby/1.8/yaml.rb:133:在加载' C:/Users/Mariusz/Sites/wiw_development/vendor/plugins/paperclip/lib/paperclip/storage.rb:236:in parse_credentials'C :/Users/Mariusz/Sites/wiw_development/vendor/plugins/paperclip/lib/paperclip/storage.rb:138:in instance_eval'C :/ Users/Mariusz/Sites/wiw_development/vendor/plugins/paperclip/lib /paperclip/storage.rb:137:in 延伸' C:/Users/Mariusz/Sites/wiw_development/vendor/plugins/paperclip/lib/paperclip/attachment.rb:269:在初始化' C:/用户/马里乌什/站点/wiw_development/vendor/plugins/paperclip/lib/paperclip.rb:326:in attachment_for'load'
C:/Ruby/lib/ruby/1.8/yaml.rb:133:in

find_credentials'
C:/Users/Mariusz/Sites/wiw_development/vendor/plugins/paperclip/lib/paperclip/storage.rb:176:in

extended'
C:/Users/Mariusz/Sites/wiw_development/vendor/plugins/paperclip/lib/paperclip/storage.rb:137:in

extended'
C:/Users/Mariusz/Sites/wiw_development/vendor/plugins/paperclip/lib/paperclip/attachment.rb:269:in

initialize_storage'
C:/Users/Mariusz/Sites/wiw_development/vendor/plugins/paperclip/lib/paperclip/attachment.rb:51:in

new'
C:/Users/Mariusz/Sites/wiw_development/vendor/plugins/paperclip/lib/paperclip.rb:326:in

C:/Users/Mariusz/Sites/wiw_development/vendor/plugins/paperclip/lib/paperclip.rb:229:in _run_erb_app47views47images47index46html46erb'C :/Users/Mariusz/Sites/wiw_development/app/views/images/index.html.erb :12:在_run_erb_app47views47images47index46html46erb'C :/Users/Mariusz/Sites/wiw_development/app/controllers/images_controller.rb:7:在'index'中 img'
C:/Users/Mariusz/Sites/wiw_development/app/views/images/index.html.erb:19:in

each'
C:/Users/Mariusz/Sites/wiw_development/app/views/images/index.html.erb:12:in

我的文件看起来像这样:

1)app/models/image.rb

class Image <ActiveRecord :: Base
has_and_belongs_to_many:pairs
validates_presence_of:img_file_name
has_attached_file:img,:styles => {:thumb =>"100x100#",:page =>"400x320>"} …

amazon ruby-on-rails amazon-s3 paperclip ruby-on-rails-plugins

0
推荐指数
1
解决办法
1314
查看次数

使用scrapy中的for循环从多个URL中抓取信息

我想从多个网址抓取信息.我使用以下代码但它不起作用.愿有人请我指出我出错的地方吗?

import scrapy

class spider1(scrapy.Spider):
    name = "spider1"
    domain = "http://www.amazon.com/dp/"
    ASIN = ['B01LA6171I', 'B00OUKHTLO','B00B7LUVZK']

    def start_request(self):
        for i in ASIN:
            yield scrapy.Request(url=domain+i,callback = self.parse)

    def parse(self, response):
       title =response.css("span#productTitle::text").extract_first().strip()
       ASIN_ext = response.xpath("//input[@name='ASIN']/@value").extract_first()
       data = {"ASIN":ASIN_ext,"title":title,}
       yield data
Run Code Online (Sandbox Code Playgroud)

python amazon web-crawler scrapy scrapy-spider

0
推荐指数
1
解决办法
1642
查看次数

如何通过 Zappa 在 Amazon Lambda 上部署多个烧瓶应用程序?

我有一堆应用程序相互交互。我需要将它们部署在 Amazon Lambda 上,每个应用程序都有每个域。我正在使用 zappa 部署它们。在我部署一个之后,只是尝试部署另一个。但我收到此错误。

错误:此应用程序已部署 - 您是要调用更新吗?

看来它要更新已经部署的以前的应用程序。我不知道这个。为什么它们被识别为相同的应用程序?你有什么想法吗?如何将其部署为 Lambda 上的独立服务?

lambda amazon flask

0
推荐指数
1
解决办法
537
查看次数

亚马逊rds db错误错误:连接ETIMEDOUT

在此处输入图片说明

我正在尝试将Amazon RDS DB连接到我的nodeJs应用程序,但出现错误和这样的配置

const connection = mysql.createConnection({
    host: '***********.*************.************.amazonaws.com',
    user: '**********',
    password: '************',
    database: '************',
    port: '3306',
  });
  connection.connect((err) => {
    if (!err) {
      start();
    }
  });
Run Code Online (Sandbox Code Playgroud)

mysql amazon node.js

0
推荐指数
1
解决办法
299
查看次数

AWS Linux:对Internet上的远程主机的非法入侵尝试。预防方法?

我启动了一个Linux实例,并执行了以下操作。

  1. 根据入站规则,只有22、80和8080端口向“所有位置”开放
  2. 仅从原始来源或使用“ yum install”命令安装了git,ruby,ruby-dev,apache和youtrack。
  3. 允许建立SSH密码连接。
  4. 我创建了一些用户。

但是,我们收到了以下邮件。

Dear Amazon EC2 Customer,

We've received a report that your instance(s):

Instance Id: i-******
IP Address: 52.33.***.***



has been making illegal intrusion attempts against remote hosts on the Internet; check the information provided below by the abuse reporter.

Host Intrusion is specifically forbidden in our User Agreement: http://aws.amazon.com/agreement/

Please immediately restrict the flow of traffic from your instances(s) to cease disruption to other networks and reply this email to send your reply …
Run Code Online (Sandbox Code Playgroud)

linux amazon amazon-ec2 amazon-web-services intrusion-detection

-1
推荐指数
1
解决办法
671
查看次数

我应该使用哪种 EC2 实例大小来为 10K 用户提供服务

我正在为电子商务应用程序移动的 rest api 建模成本,并希望确定适当的实例大小和数量。

我们的配置:

- Apache
- Slim framework PHP
Run Code Online (Sandbox Code Playgroud)

我们的估计:

- Users/Day: 10000
- Page views / User: 10
- Number total of users: 500 000
- Number total of products: 36 000
Run Code Online (Sandbox Code Playgroud)

amazon amazon-ec2 amazon-web-services

-1
推荐指数
1
解决办法
1516
查看次数