Tag: heroku

Heroku:错误将Rails应用程序推送到Heroku,Heroku找不到Rails应用程序

我试图将Rails应用程序推送到Heroku但是我经常遇到这个错误。 user$ git push heroku master Initializing repository, done. Counting objects: 158, done. Delta compression using up to 4 threads. Compressing objects: 100% (144/144), done. Writing objects: 100% (158/158), 671.52 KiB | 160.00 KiB/s, done. Total 158 (delta 32), reused 0 (delta 0) —–> Ruby app detected —–> Compiling Ruby/Rails ! ! An error occurred […]

如何将Heroku日志保存到文本文件

我遇到了Heroku中的日志问题。 当我想查看日志时,有时我错过了几行。 如何将Heroku服务器日志保存到file.txt或任何其他文件?

Rails 4 – Heroku Sqlite3错误

我和Herouku有点麻烦。 由于以下错误,我无法推送: Gem files will remain installed in /tmp/build_2jdec30lsc3bu/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.7 for inspection. Results logged to /tmp/build_2jdec30lsc3bu/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.7/ext/sqlite3/gem_make.out An error occurred while installing sqlite3 (1.3.7), and Bundler cannot continue. Make sure that `gem install sqlite3 -v ‘1.3.7’` succeeds before bundling. ! ! Failed to install gems via Bundler. ! ! Detected sqlite3 gem which is not supported on […]

Gem :: LoadError:试图在Heroku上使用时 – Rails 4

我正在尝试将一个应用程序(只是一个简单的应用程序从Rails教程)部署到heroku但它一直给我相同的错误消息。 我使用命令: git push heroku master 它开始很好,然后突然出现这个错误: —–> Preparing app for Rails asset pipeline Running: rake assets:precompile rake aborted! Gem::LoadError: Specified ‘sqlite3’ for database adapter, but the gem is not loaded. Add `gem ‘sqlite3’` to your Gemfile. 我已经做了捆绑安装,一切顺利。 这是我的Gemfile: # Use sqlite3 as the database for Active Record gem ‘sqlite3’ 也许我在databse.yml文件中遗漏了一些东西? # Ensure the SQLite […]

-bash:/ usr / local / bin / heroku:/ usr / local / bin / ruby​​:bad interpreter:没有这样的文件或目录

每当我打开一个新的终端窗口时,我现在得到: -bash: /usr/local/bin/heroku: /usr/local/bin/ruby: bad interpreter: No such file or directory 任何关于为什么会发生这种情况以及如何摆脱它的想法?

使用Rails 5在Heroku,PostgreSQL上运行迁移时出错

我使用PostgreSQL将Rails 5部署到Heroku中的免费应用程序。 这是我在database.yml配置: production: adapter: postgresql username: root password: database: example 当我运行heroku run rake db:migrate ,我看到这个错误: 耙子流产了! PG :: ConnectionBad:无法连接到服务器:没有这样的文件或目录服务器是否在本地运行并接受Unix域套接字“/var/run/postgresql/.s.PGSQL.5432”上的连接? 如果我将此行添加到database.yml : host: localhost 并再次运行迁移,我看到这个错误: 耙子流产了! PG :: ConnectionBad:无法连接到服务器:连接被拒绝服务器是否在主机“localhost”(127.0.0.1)上运行并接受端口5432上的TCP / IP连接? 怎么解决?

Heroku推送被拒绝,Ruby Version Changed Detected,找不到net-scp-1.0.6

我无法弄清楚这里发生了什么。 我周二部署到Heroku没有问题。 我没有在本地或在Gemfile上更改我的Ruby版本,但是heroku告诉我我已经更改了Ruby版本并且它无法找到net-scp-1.0.6。 一切都在本地完美运作,我搜索周围,找不到解决类似问题的任何事情。 Counting objects: 81, done. Delta compression using up to 4 threads. Compressing objects: 100% (62/62), done. Writing objects: 100% (62/62), 10.77 KiB, done. Total 62 (delta 49), reused 0 (delta 0) —–> Deleting 8 files matching .slugignore patterns. —–> Removing .DS_Store files —–> Ruby/Rails app detected —–> Using Ruby version: ruby-1.9.3 […]

未定义的方法auto_upgrade! 将Sinatra / DataMapper应用程序推送到Heroku时

有没有人知道在Heroku的Bamboo堆栈上运行使用DataMapper的Sinatra应用程序所需的神奇咒语? Bamboo堆栈不包含任何预安装的系统gem,无论我尝试什么样的gem组合,我都会遇到此错误: undefined method `auto_upgrade!’ for DataMapper:Module (NoMethodError) 这就是我的.gems文件中的内容: sinatra pg datamapper do_postgres dm-postgres-adapter 这些是我将应用程序推送到Heroku时安装的依赖项: —–> Heroku receiving push —–> Sinatra app detected —–> Installing gem sinatra from http://rubygems.org Successfully installed sinatra-1.0 1 gem installed —–> Installing gem pg from http://rubygems.org Building native extensions. This could take a while… Successfully installed pg-0.9.0 1 gem installed […]

如何解析位于Amazon S3存储桶中的CSV文件

下面是我用来从应用程序中解析CVS的代码,但我想解析位于Amazon S3存储桶中的文件。 它也需要在推送到Heroku时工作​​。 namespace :csvimport do desc “Import CSV Data to Inventory.” task :wiwt => :environment do require ‘csv’ csv_file_path = Rails.root.join(‘public’, ‘wiwt.csv.txt’) CSV.foreach(csv_file_path) do |row| p = Wiwt.create!({ :user_id => row[0], :date_worn => row[1], :inventory_id => row[2], }) end end end

安装heroku toolbelt后出现Ruby错误

我正在使用Heroku工作,赢得7 – 32位系统,我没有管理员权限。 我已经在http://community.webfaction.com/questions/11803/heroku-toolbelt下载并安装了heroku工具带 cd ~ curl http://assets.heroku.com/heroku-client/heroku-client.tgz | tar zx export PATH=$HOME/heroku-client/bin/:$PATH 按照Leo的建议,我已经在windows路径中添加了ruby来解决这个问题 现在我跑的时候: $ heroku run bash –app MYAPP 我明白了: f:/heroku-client/lib/heroku/updater.rb:164:in `spawn’: Exec format error – “m:/heroku-client/bin/heroku” update (Errno::ENOEXEC) from f:/heroku-client/lib/heroku/updater.rb:164:in `background_update!’ from f:/heroku-client/lib/heroku/updater.rb:144:in `inject_libpath’ from f:/heroku-client/bin/heroku:19:in `’ 我已经添加到windows env变量路径: F:/heroku-client/bin/;f:/heroku-client/lib/heroku/ 我怎样才能解决这个问题?