- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在使用 Rails 4.0.0.rc2 和 Ruby 1.9.3 我已经创建了应用程序,并且我已经使用 git push 将该应用程序推送到 GitHub 存储库。
当我尝试使用 git push heroku master 命令时,出现以下错误:
C:\Sites\first_app>git push heroku master
Counting objects: 101, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (92/92), done.
Writing objects: 100% (101/101), 21.02 KiB, done.
Total 101 (delta 7), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: sh: 2: Syntax error: Unterminated quoted string
remote: !
remote: ! There was an error parsing your Gemfile, we cannot continue
remote: ! --- ERROR REPORT TEMPLATE ---------------------------------------------------
remote: ! - What did you do?
remote: !
remote: ! I ran the command `/tmp/d20151213-205-1wyxt7v/bundler-1.9.7/bin/b
undle check`
remote: !
remote: ! - What did you expect to happen?
remote: !
remote: ! I expected Bundler to...
remote: !
remote: ! - What happened instead?
remote: !
remote: ! Instead, what actually happened was...
remote: !
remote: !
remote: ! Error details
remote: !
remote: ! LocalJumpError: no block given (yield)
remote: ! /tmp/d20151213-205-1wyxt7v/bundler-1.9.7/gems/bundler-1.9.7/lib/b
undler/dsl.rb:166:in `group'
remote: ! /tmp/build_2e1664b3e9f6ede5a8c91d27f6a70ce3/Gemfile:11:in `eval_gemfile'
remote: ! /tmp/d20151213-205-1wyxt7v/bundler-1.9.7/gems/bundler-1.9.7/lib/bundler/dsl.rb:32:in `instance_eval'
remote: ! /tmp/d20151213-205-1wyxt7v/bundler-1.9.7/gems/bundler-1.9.7/lib/bundler/dsl.rb:32:in `eval_gemfile'
remote: ! /tmp/d20151213-205-1wyxt7v/bundler-1.9.7/gems/bundler-1.9.7/lib/bundler/dsl.rb:10:in `evaluate'
remote: ! /tmp/d20151213-205-1wyxt7v/bundler-1.9.7/gems/bundler-1.9.7/lib/bundler/definition.rb:25:in `build'
remote: ! /tmp/d20151213-205-1wyxt7v/bundler-1.9.7/gems/bundler-1.9.7/lib/bundler.rb:155:in `definition'
remote: ! /tmp/d20151213-205-1wyxt7v/bundler-1.9.7/gems/bundler-1.9.7/lib/bundler/cli/check.rb:11:in `run'
remote: ! /tmp/d20151213-205-1wyxt7v/bundler-1.9.7/gems/bundler-1.9.7/lib/bundler/cli.rb:103:in `check'
remote: ! /tmp/d20151213-205-1wyxt7v/bundler-1.9.7/gems/bundler-1.9.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
remote: ! /tmp/d20151213-205-1wyxt7v/bundler-1.9.7/gems/bundler-1.9.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
remote: ! /tmp/d20151213-205-1wyxt7v/bundler-1.9.7/gems/bundler-1.9.7/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
remote: ! /tmp/d20151213-205-1wyxt7v/bundler-1.9.7/gems/bundler-1.9.7/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
remote: ! /tmp/d20151213-205-1wyxt7v/bundler-1.9.7/gems/bundler-1.9.7/lib/bundler/cli.rb:10:in `start'
remote: ! /tmp/d20151213-205-1wyxt7v/bundler-1.9.7/gems/bundler-1.9.7/bin/bundle:20:in `block in <top (required)>'
remote: ! /tmp/d20151213-205-1wyxt7v/bundler-1.9.7/gems/bundler-1.9.7/lib/bundler/friendly_errors.rb:7:in `with_friendly_errors'
remote: ! /tmp/d20151213-205-1wyxt7v/bundler-1.9.7/gems/bundler-1.9.7/bin/bundle:18:in `<top (required)>'
remote: ! /tmp/d20151213-205-1wyxt7v/bundler-1.9.7/bin/bundle:23:in `load'
remote: ! /tmp/d20151213-205-1wyxt7v/bundler-1.9.7/bin/bundle:23:in `<main>'
remote: !
remote: ! Environment
remote: !
remote: ! Bundler 1.9.7
remote: ! Rubygems 2.4.5.1
remote: ! Ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
remote: ! GEM_HOME /tmp/build_2e1664b3e9f6ede5a8c91d27f6a70ce3/vendor/bundle
remote: ! GEM_PATH
remote: ! Git 1.9.1
remote: !
remote: ! Bundler settings
remote: !
remote: ! frozen
remote: ! Set for the current user (/app/.bundle/config): "1"
remote: ! path
remote: ! Set for the current user (/app/.bundle/config): "vendor/bundle"
remote: ! bin
remote: ! Set for the current user (/app/.bundle/config): "vendor/bundle/bin"
remote: ! jobs
remote: ! Set for the current user (/app/.bundle/config): "4"
remote: ! without
remote: ! Set for the current user (/app/.bundle/config): "development:test"
remote: ! disable_shared_gems
remote: ! Set for the current user (/app/.bundle/config): "1"
remote: ! gemfile
remote: ! Set via BUNDLE_GEMFILE: "/tmp/build_2e1664b3e9f6ede5a8c91d27f6a70ce3/Gemfile"
remote: ! --- TEMPLATE END ----------------------------------------------------------------
remote: !
remote: ! Unfortunately, an unexpected error occurred, and Bundler cannot continue.
remote: !
remote: ! First, try this link to see if there are any existing issue reports for this error:
remote: ! https://github.com/bundler/bundler/search?q=no+block+given+%28yield%29&type=Issues
remote: !
remote: ! If there aren't any reports for this error yet, please create copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at:
remote: ! https://github.com/bundler/bundler/issues/new
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to arcane-coast-8104.
remote:
To https://git.heroku.com/arcane-coast-8104.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/arcane-coast-8104.git
当我使用heroku open 命令时
我得到了这个页面
这是怎么回事?
我怎样才能部署到 Heroku?
下面是我的整个gemfile源
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0.rc2'
#Add Bootstrap for pretty UI
gem 'bootstrap-sass', '2.3.2'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', group: [:development, :test]
gem 'pg', group: :production
gem 'rails_12factor', group: :production
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0.rc2'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
#force for now
gem 'sprockets', '=2.11.0'
gem 'heroku', '~> 3.42', '>= 3.42.25'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
我的本地主机截图 localhost:3000
最佳答案
您的 Heroku 环境中很可能有一个 .env
文件,其中包含一个带有未终止字符串的变量声明。这由 dotenv
评估并导致您的 Gemfile 出现问题。
关于ruby-on-rails - 为什么我得到远程 : sh: 2: Syntax error: Unterminated quoted string when I ran git push heroku master,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34248535/
我有一个非常简单的 Python 代码,但不明白为什么循环不会停止。我特别想在函数内部使用辅助函数。有什么想法吗? def x(): a = range(0,5) def y(ran)
本文实例讲述了Python使用pickle模块报错EOFError Ran out of input的解决方法。分享给大家供大家参考,具体如下: 遇到了 EOFError:Ran out of i
Ran out of input 我在pytorch测试DataLoader时报错,代码: testloader = DataLoader(test, batch_size=16, shuffle=T
当我运行下面的代码时,我收到此错误消息“EOFError: Ran out of input”这是什么意思??怎么才能矫正??以及如何在屏幕上输出记录的详细信息。 import pickle # th
一切正常,直到: celery beat v3.1.18 (Cipater) is starting. __ - ... __ - _ Configuration ->
我已经使用Excel VBA开发了一个程序,该程序偶尔会导致“Excel Ran资源不足”错误。 关闭文件,重新打开并重新运行宏总是可以修复导致错误的任何问题。我知道首先避免错误是最佳实践,但我辞职认
描述: 我需要制作一个电子表格类型的计算器来跟踪在线游戏(ArcheAge)中的信息。该“电子表格”必须保存信息并以 5 分钟为增量自动更新一组值(最好将其作为文件保存到计算机上。这是我正在开发的一个
在为节日运行 C++ 代码时,我正在使用多种语言,如美国 diaphone、意大利语等。但是当播放一种语言后,我选择另一种语言,然后终端显示错误“SIOD:存储空间不足”,并且什么都不做。谁能帮帮我?
我运行 go test 并得到超时错误: *** Test killed with quit: ran too long (10m0s). FAIL call/httptest 600.05
我有一个 .obj文件中,以前我将图像转换为 base64 并使用 pickle 保存. 问题是当我尝试加载 .obj 时文件与 pickle ,将代码从base64转成图片,用pygame加载. 加
我们正在开发一个iOS应用。当我们在PC上测试该应用程序时,一切正常,但是当我们在iPad/iPhone4上运行该应用程序时,我们经常会收到“Ran out of Trampolines type 2
因此,我正在从事的项目之一要求我们获取服务器上运行的每个查询,并将该查询自动粘贴到数据库内的表中。这样做的原因是 DBA 能够查看之前在机器上运行的所有 SQL 查询。不幸的是,我没有任何余地以不同的
任何人都可以告诉我这个错误... 数据库有 40,000 条新闻报道,但只有“story”字段较大,'old' 是一个数值 0 或 1,'title' 和 'shortstory' 非常短或为 NUL
我正在制作一个 java 项目的框架; gradle 构建文件有一个烦人的问题:测试运行了两次,一次由任务“JUnitPlatformTest”运行,第二次由任务“test”运行。 第一个似乎触发了第
我正在为我正在设计的系统使用带有 mysql 数据库的 spring MVC。 当我尝试从 spring Controller 将对象传递到 html 页面时,遇到了标题中引用的错误。 我正在尝试做的
我无法对我的代码进行单元测试。 $_SESSION 每次运行下一个测试时都会清除。当我运行 testStartProductSession() 时,我的对象将一些数据添加到 $_SESSION 变量。
我正在运行 Tensor Flow 版本 0.7.1,支持 64 位 GPU,使用 pip 安装,并且在装有 Ubuntu 14.04 的 PC 上运行。我的问题是在构建网络时 Tensor Flow
我在尝试使用 Unpickler.load() 时遇到一个有趣的错误,这里是源代码: open(target, 'a').close() scores = {}; with open(target,
我通过 miniforge 安装了 conda:https://github.com/conda-forge/miniforge 我的环境一直正常工作,直到最近任何 conda 命令都会导致: Col
我看到这个错误被发布了很多,通常是由于文件在打开后没有正确关闭。但由于我使用的是集成的 torch.load() 函数,我不确定我能做些什么不同的事情。 首先是保存部分: torch.save
我是一名优秀的程序员,十分优秀!