Tag: heroku

Heroku Rails设置“您正在寻找的页面不存在。”

我正在关注这个Rails教程 。 当我在本地运行rails服务器时,我可以看到“Welcome Aboard”页面。 但是,在部署到Heroku时,它显示“您正在寻找的页面不存在”。 我已经四处寻找但找不到任何可以解决我问题的方法。 以下是我的步骤: rails new first_app 对Gemfile进行此更改: group :production do gem ‘pg’ end group :development do gem ‘sqlite3’ end 然后, bundle update bundle install bundle install –without production rake assets:precompile git init git add . git commit -m “initial commit” heroku login heroku create git push heroku master heroku open 此时,它会打开heroku应用程序的地址,并显示“不存在”错误。 […]

Ruby on Rails:heroku运行rake资产:预编译

请帮助我理解heroku run rake assets:precompile究竟是什么。 自从我开始在rails上使用ruby之后,我总是在推送到github和heroku之前运行这三个命令: bundle exec rake assets:precompile RAILS_ENV=production bundle exec rake assets:precompile 在我推送到heroku之后,我会跑: heroku run rake assets:precompile 但是,当我在上次推送到heroku后尝试运行它时,我在不同的文件上遇到了一堆相同的错误。 例如: Warning. Error encountered while saving cache … can’t dump anonymous class … 为了看看我能解决这个问题,我跑了 heroku run rake assets:clean然后heroku run rake assets:precompile再次heroku run rake assets:precompile 。 问题是一切都运转良好,但我觉得如果有这些警告/错误。 请帮我理解。 谢谢!

使用oink gem和heroku

我已经安装了oink gem来监控rails应用程序的内存使用情况。 为了查看oink报告,我需要在终端中运行此命令: oink –threshold=75 /log/* 当我在我的机器上运行它时,它会显示开发环境的报告。 问题是我更感兴趣的是看到我的生产环境的报告。 我的应用程序托管在heroku上,有没有办法为heroku的生产环境运行oink的终端命令? 谢谢

是否有可能跳过Heroku上单个git推送的资产预编译步骤?

每次我将我的Rails 3.2项目部署到Heroku时, rake assets:precompile运行rake assets:precompile : $ git push heroku master … —-> Preparing app for Rails asset pipeline Running: rake assets:precompile Asset precompilation completed (189.17s) … 有时我想推动我知道不会改变任何资产,例如对控制器的快速修补程序。 是否有可能跳过资产:单个git推送到Heroku的预编译步骤? 谢谢。

跟踪heroku上的应用程序内存使用情况

我正在heroku上托管一个rails应用程序。 有没有办法可以跟踪正在运行的dynos的内存使用情况? 谢谢

如何在Heroku上阻止或过滤IP地址?

有没有办法实现IP过滤或IP访问规则,就像我使用nginx / apache来限制或阻止Heroku上的某些IP一样? 注意:我知道这可以在我的应用程序(Rails 3.2)中轻松完成,但我不认为这是Heroku上最有效的资源使用。 此外,基于Rack的解决方案比在Rails中实现过滤更好。

git clone heroku ssh权限被拒绝

我刚买了一台新电脑,我正试图克隆我的heroku项目。 这是我到目前为止所做的。 我没有包含跟踪,但是所有内容都保存在正确的位置,并且函数运行没有错误。 >> sudo ssh-keygen >> heroku keys:add >> sudo git clone -o heroku git@heroku.com:myapp.git Initialized empty Git repository in /Users/macuser/Sites/shwagr/shwagr/.git/ Permission denied (publickey). 然后我听说通过ssh bash做到这一点.. >ssh-agent bash >ssh-add ~/.ssh Permissions 0777 for ‘/Users/macuser/.ssh’ are too open. It is recommended that your private key files are NOT accessible by others. This private key will […]

如何在heroku上更新应用程序

我是heroku的新手。 我创建了一个非常简单的rails应用程序,并将其部署到heroku。 我怎样才能将更改提交给git?

ActionDispatch :: Routing :: RouteSet#调用Rails 4.1真的很慢

我搜索了几天但找不到这个问题的任何相关答案。 在Heroku上托管的我的Rails 4.1应用程序中,当负载增加时,一些PUT请求变得非常慢。 今天最慢的是53秒。 所有没有数据库(MongoDB)注册任何慢查询。 通常这个请求需要0.3ms,所以非常快。 无论有效载荷是什么,请求都很慢。 在安装New Relic后,它更清楚了解情况,但我仍然不知道在哪里解决这个问题。 控制器中的代码很快,但根据New Relic,速度慢的是ActionDispatch :: Routing :: RouteSet #call 这是New Relic报道的转储: Slowest components Count Duration % ActionDispatch::Routing::RouteSet#call 1 53,000 ms 100% Plugin::FetchablesController#update 1 38 ms 0% Rails::Rack::Logger#call 1 1 ms 0% ActionDispatch::Cookies#call 1 1 ms 0% ActiveSupport::Cache::Strategy::LocalCache::Middleware#call 1 0 ms 0% Rack::Runtime#call 1 0 ms 0% Total 53,000 […]

Rails 3.1。 Heroku PGError:运算符不存在:字符变化=整数

修复错误有点麻烦。 一切都适用于本地机器。 在PG上,heroku是错误的。 这是日志: ←[32m2012-01-09T19:52:24+00:00 app[web.1]:←[0m ActionView::Template::Error (PGEr ror: ERROR: operator does not exist: character varying = integer ←[32m2012-01-09T19:52:24+00:00 app[web.1]:←[0m LINE 1: …T “reviews”.* FROM “re views” WHERE “reviews”.”trip_id” = 32 ←[32m2012-01-09T19:52:24+00:00 app[web.1]:←[0m : SELECT “reviews”.* FROM “review s” WHERE “reviews”.”trip_id” = 32): ←[32m2012-01-09T19:52:24+00:00 app[web.1]:←[0m 31: ←[32m2012-01-09T19:52:24+00:00 app[web.1]:←[0m 33: ←[32m2012-01-09T19:52:24+00:00 app[web.1]:←[0m 34: ←[32m2012-01-09T19:52:24+00:00 app[web.1]:←[0m 32: […]