Tag: heroku

Unicorn在资产预编译期间触发mongoid错误

我有一个使用在Heroku上运行的Mongoid 3的rails应用程序。 我刚刚更新它以使用Unicorn。 当我尝试将其部署到Heroku时,我收到以下错误: Running: rake assets:precompile rake aborted! undefined method `match’ for nil:NilClass /tmp/build_3nnbzpfmnjpns/vendor/bundle/ruby/1.9.1/gems/mongoid-3.0.21/lib/mongoid/sessions/mongo_uri.rb:49:in `initialize’ 完整的堆栈跟踪可以在http://pastebin.com/8YcJHEmS找到 但是如果我从我的Gemfile中删除Unicorn,资产编译就会成功。 查看Mongoid代码,我可以看到当mongoid.yml文件被解析时发生错误,但我无法弄清楚为什么Unicorn会导致失败。 我的mongoid.yml文件如下所示: production: sessions: default: uri: options: skip_version_check: true safe: true 我的Gemfile: source ‘https://rubygems.org’ ruby ‘1.9.3’ gem ‘rails’, ‘3.2.11’ gem ‘thin’ group :assets do gem ‘sass-rails’, ‘~> 3.2’ gem ‘coffee-rails’, ‘~> 3.2’ gem ‘uglifier’, ‘>= 1.0.3’ gem […]

推送应用程序到heroku

我正在尝试将rails应用程序推送到heroku。 当我到达最后一步时: git push heroku master 它不起作用,并给我这些错误: Counting objects: 85, done. Delta compression using up to 2 threads. Compressing objects: 100% (74/74), done. Writing objects: 100% (85/85), 24.38 KiB, done. Total 85 (delta 23), reused 0 (delta 0) —–> Heroku receiving push ! Heroku push rejected, no Rails or Rack app detected. error: hooks/pre-receive exited […]

PG :: StringDataRightTruncation:错误:PostgreSQL字符串(255)限制| Heroku的

我有一个Listings controller ,用户可以添加说明。 如果描述很长,它应该是,我在Heroku中收到此错误: ActiveRecord::StatementInvalid (PG::StringDataRightTruncation: ERROR: value too long for type character varying(255) 我怎样才能解决这个问题? 编辑 我发现(John也说)我必须将我的表字符串(有一个限制)改为:文本是无限的。 但只是在迁移中更改表似乎不起作用。 我编辑的列表迁移 class CreateListings nil t.timestamps end end end 但我仍然遇到了Heroku麻烦 – > 2013-07-29T09:39:05.069692+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::StringDataRightTruncation: ERROR: value too long for type character v rying(255) 2013-07-29T09:39:05.069870+00:00 app[web.1]: 2013-07-29T09:39:05.069692+00:00 app[web.1]: : INSERT INTO “listings” (“created_at”, “description”, “image_content_type”, “image_file_name”, “image_fil […]

当我在Unicorn服务器上运行时,Websockets在我的Rails应用程序中不起作用,但在瘦服务器上运行

我正在学习Ruby on Rails,在Heroku上使用WebSockets构建一个实时Web应用程序,但我无法弄清楚为何在Unicorn服务器上运行时websocket连接失败。 我将我的Rails应用程序配置为使用Procfile在本地和Heroku上运行Unicorn … web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb …我在本地开始与$foreman start 。 在javascript中在客户端上创建websocket连接时发生故障… var dispatcher = new WebSocketRails(‘0.0.0.0:3000/websocket’); //I update the URL before pushing to Heroku …在Chrome Javascript控制台中出现以下错误, ‘websocket connection to ws://0.0.0.0:3000/websocket’ failed. Connection closed before receiving a handshake response. ‘websocket connection to ws://0.0.0.0:3000/websocket’ failed. Connection closed before receiving a handshake […]

将rails部署到heroku – 未经授权的公钥访问

所以我正在尝试将我的应用程序部署到heroku,但每当我推动掌握它时它会一直给我这个错误: ! Your key with fingerprint cb:e1:5c:31:cd:6b:78:6e:30:ff:eb:11:e2:4b:2e:b3 is not authorized to access smooth-mountain-8970. 我尝试了从生成新的ssh密钥到删除所有内容和替换文件的所有内容。 我甚至创建了一个不同的用户名并尝试上传,但它一直给我这个错误,认为我想上传到平滑山,实际上,我的应用名称不是光滑的山。 你们知道问题可能是什么吗? 谢谢。

omn​​iauth与facebook没有合作生产

我正在使用我的rails应用程序中的omniauth,我已经在facebook和twitter按钮上签名,当我在网站上放置facebook时,url提交localhost:3000,一切正常,但是当我将网站上传到heroku时并在网站URL更改为sitename.heroku.com,twiiter登录按钮工作,但Facebook按钮不起作用…

ActionView :: Template :: Error(960.css未预编译)

我有一个iframe,它呈现部分并且不是主应用程序布局或资产管道的一部分。 我想要包含一些样式表,但是我收到此错误: ActionView::Template::Error (960sm.css isn’t precompiled): Rails 3.1 Heroku

当它“挂断”或没有响应时,如何推送到Heroku或获取信息/状态?

尝试将更新的应用程序推送到Heroku时出现错误(可能与此问题相同): > git push heroku master ssh: connect to host heroku.com port 22: Bad file number fatal: The remote end hung up unexpectedly 我无法连接到APIurl > heroku info ! Unable to connect to api.heroku.com 我也无法获得身份 > heroku status C:/Ruby192/lib/ruby/1.9.1/net/http.rb:644:in `initialize’: A connection attempt failed because the connected party did not properly respond after a period of […]

通过twitter-bootstrap-rails gem升级到bootstrap 2.0.1后,Heroku部署失败

更新: 在git push heroku master显示此错误: —–> Preparing app for Rails asset pipeline Running: rake assets:precompile rake aborted! couldn’t find file ‘twitter/bootstrap’ (in /tmp/build_2pmsvze33th3e/app/assets/javascripts/application.js:9) Tasks: TOP => assets:precompile:primary (See full trace by running task with –trace) Precompiling assets failed, enabling runtime asset compilation Injecting rails31_enable_runtime_asset_compilation Please see this article for troubleshooting help: http://devcenter.heroku.com/articles/rails31_heroku_cedar#troubleshooting 我按照本指南将Bootstrap 2布局升级到2.0.1。 之后,我将这个错误发送到了Heroku: […]

Rails 5生产应用程序中的Heroku JS错误

我现在有两个月的问题,我在这个问题的无数线索中得到的答案都没有解决我的问题。 所以我给它另一个令人沮丧的尝试: 当我的应用程序在Heroku上运行时,我得到了一个JavaScript错误。 我在浏览器控制台中获得的错误是: Uncaught TypeError: ht.each is not a function at application-b030a52a6989f6564d19974180747e99f4ac5a28109188d096b47fc12a38f2cf.js:1 at application-b030a52a6989f6564d19974180747e99f4ac5a28109188d096b47fc12a38f2cf.js:1 at application-b030a52a6989f6564d19974180747e99f4ac5a28109188d096b47fc12a38f2cf.js:1 当我在本地生产我的应用程序时,我不会收到此错误,这是因为我的 /公/资产 文件夹看起来像这样: .sprockets-manifest-a7e0d8d7f0627b40ca52eea9623fee45.json application-a358e1eb31a8f590691be18692bb2f57be910bbb2c5800a4dcb95a6c56deb358.js application-a358e1eb31a8f590691be18692bb2f57be910bbb2c5800a4dcb95a6c56deb358.js.gz application-ea2c1b8977f914f6ea0d3aa17e9a18079d0fd8ab6b9aa1a88609bcaba62135d5.css application-ea2c1b8977f914f6ea0d3aa17e9a18079d0fd8ab6b9aa1a88609bcaba62135d5.css.gz bootstrap rails-c094bc3a4bf50e5bb477109e5cb0d213af27ad75b481c4df249f50974dbeefe6.png 在Heroku上,同一个文件夹包含以下内容: application-18082fe8586b430e37211d8a126c18df28136b583c39a4a6ceb1418202d665a3.css application-18082fe8586b430e37211d8a126c18df28136b583c39a4a6ceb1418202d665a3.css.gz application-8344b3a5f740968bd820e663ceac72950f2c3dbec18583fa38efec5788e87e31.js application-8344b3a5f740968bd820e663ceac72950f2c3dbec18583fa38efec5788e87e31.js.gz application-a5ee6c15ec2d7545c56a0340738bf8bf07d80b954e685fd04cff6067f34ec439.css application-a5ee6c15ec2d7545c56a0340738bf8bf07d80b954e685fd04cff6067f34ec439.css.gz application-b030a52a6989f6564d19974180747e99f4ac5a28109188d096b47fc12a38f2cf.js application-b030a52a6989f6564d19974180747e99f4ac5a28109188d096b47fc12a38f2cf.js.gz application-baa8861fe552f67418ef50a3fcdbb69e3a2ab43226917999d296f85bb407d3e2.js application-baa8861fe552f67418ef50a3fcdbb69e3a2ab43226917999d296f85bb407d3e2.js.gz application-cb3abf099471b60aa6a5318e339b92c962f22034d16f78b0f6700a1a4abf42dd.css application-cb3abf099471b60aa6a5318e339b92c962f22034d16f78b0f6700a1a4abf42dd.css.gz bootstrap 在本地,这些JavaScript文件被加载到发生错误的站点: 但是在Heroku上,该站点只加载了这个JS文件 (它似乎是由本地加载的所有文件组成的,现在互相冲突,但我真的不知道) 有人可以帮我把它运行在Heroku上吗? 有问题的代码是Michael Hartl的标准“sample_app”,他的代码是1对1,它或多或少地适用于其他所有人,但不适合我。 我正在Windows上使用Rails和Ruby更新 我试过的: #1:预编译public / assets文件夹并清理然后推送,这当然很愚蠢,因为git没有推送这个文件夹,但人们建议我跟着 #2:删除上面的文件夹然后再推它,同样的问题就像上面那样…… #3: 以各种可能的方式在我的app/assets/javascripts/application.js文件中重新排列require语句: […]