Tag: heroku

遵循Python / Flask Heroku教程时“foreman start”出错

遵循所有说明。 运行foreman start时出现此错误: C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/foreman-0.47.0/lib/fo reman/engine.rb:39:in `trap’: unsupported signal SIGHUP (ArgumentError) from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/foreman-0.47.0/lib/foreman/engine.rb:39:in `start’ from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/foreman-0.47.0/lib/foreman/cli.rb:34:in `start’ from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.15.3/lib/thor/task.rb:27:in `run’ from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.15.3/lib/thor/invocation.rb:120:in `invoke_task’ from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.15.3/lib/thor.rb:275:in `dispatch’ from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.15.3/lib/thor/base.rb:425:in `start’ from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/foreman-0.47.0/bin/foreman:7:in `’ from C:/Program Files (x86)/ruby-1.9.3/bin/foreman:19:in `load’ from C:/Program Files […]

Heroku和Datamapper问题

我可以在Heroku上启动一个基本应用程序,显示带有’/’的消息…工作得很好。 但是,每当我尝试使用datamapper添加sqlite时,事情就会崩溃。 要查看我的应用程序结构,请查看github上的项目。 我保持代码相当简陋。 在heroku的日志中我得到: 2011-06-26T21:28:36+00:00 app[web.1]: /app/.bundle/gems/ruby/1.9.1/gems/dm-core-1.1.0/lib/dm-core/adapters.rb:163:in `require’: no such file to load — dm-postgres-adapter (LoadError) 关于这一点的是我没有使用postgres,所以我很困惑为什么这么说。

尝试在Windows XP中使用Heroku时找不到msvcrt-ruby18.dll

我有一个学生在Windows XP上开发,他在尝试运行heroku keys:add时遇到了一个奇怪的错误heroku keys:add 。 错误是: This application has failed to start because msvcrt-ruby18.dll was not found. Re-installing the application may fix this problem. 经过大约半个小时的尝试,我的google-fu在这一次失败了。 有人可以帮忙吗?

使用Paperclip和Padrino

背景:我正在使用Padrino,Ruby 1.9.2,HAML和Heroku构建一个简单的博客。 我希望post索引具有杂志般的外观。 对于索引中的每个post,用户应该看到标题,内容摘要和图像。 我的问题是附加图像。 问题:我一直在尝试使用Paperclip gem将图像附加到每个post。 Heroku将从Amazon S3 bin中捕获实际图像。 到目前为止,当我尝试运行迁移时,我收到错误: $ …/base.rb:1088:in `method_missing’: undefined method `has_attached_file’ for # (NoMethodError) 看起来像Paperclip只是不会加载,但是我被卡住了。 详细信息: – 问:当我“尝试运行迁移”时,我在做什么? – 答:我将以下内容放入迁移文件夹中 class AddPictureToPost < ActiveRecord::Migration def self.up change_table :posts do |t| t.has_attached_file :picture end end def self.down drop_attached_file :posts, :picture end end 然后运行“padrino rake ar:migrate” – 问:我是否在Gemfile中列出了Paperclip? – A:是的。 – […]

注销不使用Heroku – 使用Devise gem和Rails 4

我刚刚使用Devise进行身份validation的Rails 4应用程序初始部署到Heroku。 注销在本地工作,但Heroku返回错误“您正在寻找的页面不存在”,并且它不会将用户注销。 根据Heroku日志和Google / SO搜索,看起来原因是Heroku使用的是GET请求而不是DELETE – 尽管我的应用代码指定了链接的:delete方法,而Devise使用DELETE进行签名默认。 有些文章建议Heroku使用GET,以便用户可以在没有启用JavaScript的情况下注销,但我的代码中包含JS include标记,并且在我的浏览器中启用了JS。 (我已经使用Chrome和Safari进行了检查。) 我找到了更改配置的说明,以便Devise使用:get而不是:delete,但我更愿意使用更安全:delete方法,如果可能的话。 感谢到目前为止的想法。 回答你的问题: 这是我的链接: 这是我在head标签中加载javascript的内容: true %> 控制台中未报告任何JS错误。

从AWS S3读取CSV文件时获取“Errno :: ENOENT:没有此类文件或目录@ rb_sysopen”

我有部署到Heroku的应用程序。 我添加了通过CSV上传用户的function。 为此,我提供了CSV上传function(二手Paperclip gem)。 这是我的代码,用于读取文件和创建新用户 def import(file) CSV.foreach(file.path, headers: true) do |row| row_hash = row.to_hash.values data = row_hash[0].split(“\t”) . . . end 在当地它工作正常。 但是在heroku上,它给了我以下错误 Errno::ENOENT: No such file or directory @ rb_sysopen – https://s3.amazonaws.com/…./…./sample_csv(2).csv 我在amazon-s3中引用了以下链接Errno :: ENOENT(没有这样的文件或目录) 文件从亚马逊服务器读取,ruby在轨道上,没有匹配路由 但没有任何成功。 为了更多的调试,我从我的本地rails控制台尝试了相同的URL,它给了我同样的错误。 2.2.2 :008 > cp = “https://s3.amazonaws.com/…./…./sample_csv(2).csv” 2.2.2 :008 > f = File.open(cp, “r”) Errno::ENOENT: No […]

`fetch’:找不到键:“S3_BUCKET_NAME”(KeyError)with paperclip / aws s3 / rails

我收到了’fetch’: key not found: “S3_BUCKET_NAME” (KeyError)使用’aws-sdk’,’〜> 2.3’和“paperclip”,“〜> 5.0.0”在rails(4.2.3 ‘fetch’: key not found: “S3_BUCKET_NAME” (KeyError)出现’fetch’: key not found: “S3_BUCKET_NAME” (KeyError)错误 我已经通过终端在我的环境中设置了密钥,并且运行heroku config显示它们已列出。 在我的config / environments / development.rb以及我的配置production.rb中,我包括: config.paperclip_defaults = { storage: :s3, s3_credentials: { bucket: ENV.fetch(‘S3_BUCKET_NAME’), access_key_id: ENV.fetch(‘AWS_ACCESS_KEY_ID’), secret_access_key: ENV.fetch(‘AWS_SECRET_ACCESS_KEY’), s3_region: ENV.fetch(‘AWS_REGION’), } } 我还在我的user.rb模型中包含了上面的代码,但为了便于参考,它在模型中看起来像这样: has_attached_file :avatar, styles: { medium: “300×300#”, thumb: “100×100#” }, :convert_options => […]

为Clojure应用程序启动工头的问题

我试图按照指南在Heroku上获得一个Clojure应用程序。 一切正常,除了在本地运行。 我正在使用Windows 7。 这一步说: gem安装工头 工头开始 在1我必须是管理员,但安装顺利 当我执行2时,我得到: C:/Program Files (x86)/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require’: no such file to load — pty (LoadError) from C:/Program Files (x86)/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require’ from C:/Program Files (x86)/Ruby192/lib/ruby/gems/1.9.1/gems/foreman-0.19.0/lib/foreman/engine.rb:4:in `’ from C:/Program Files (x86)/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require’ from C:/Program Files (x86)/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require’ from C:/Program Files (x86)/Ruby192/lib/ruby/gems/1.9.1/gems/foreman-0.19.0/lib/foreman/cli.rb:2:in `’ from C:/Program Files (x86)/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require’ from C:/Program Files (x86)/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in […]

heroku命令存在于这些Ruby版本中?

用rbenv更新我的Ruby版本后,我无法使用Heroku命令行工具。 我收到了这个错误: > heroku rbenv: heroku: command not found The `heroku’ command exists in these Ruby versions: 2.0.0-p195 从toolbelt.heroku.com重新安装工具带没有帮助。

`undefined方法`find_asset’代表nil:NilClass`

我使用’rails’, ‘4.2.5’和wicked_pdf gem来生成和下载PDF,但是在Heroku上,它不包括使用wicked_pdf_stylesheet_link_tag标签的css。 Heroku错误日志: ActionView::Template::Error (undefined method ‘find_asset’ for nil:NilClass) 我在这里错过了任何配置吗?