- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想将我的 Rails 应用程序部署到 Heroku。当然,我还包括一些额外的 gem,例如“devise”或“rails_admin”。我严格遵循 Rails Girls 的教程 (http://guides.railsgirls.com/heroku/)。我在运行 git push heroku master
时遇到了一些非常烦人的问题。
Counting objects: 220, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (198/198), done.
Writing objects: 100% (220/220), 94.69 KiB | 0 bytes/s, done.
Total 220 (delta 21), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.0.0
remote: -----> Installing dependencies using 1.7.12
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Fetching gem metadata from https://rubygems.org/...........
remote: Installing i18n 0.7.0
remote: Installing rake 10.4.2
remote: Installing minitest 5.5.1
remote: Installing thread_safe 0.3.4
remote: Installing builder 3.2.2
remote: Installing erubis 2.7.0
remote: Installing mini_portile 0.6.2
remote: Installing mime-types 2.4.3
remote: Installing rack 1.6.0
remote: Installing arel 6.0.0
remote: Installing coffee-script-source 1.8.0
remote: Installing execjs 2.2.2
remote: Installing thor 0.19.1
remote: Installing hike 1.2.3
remote: Installing multi_json 1.10.1
remote: Using bundler 1.7.12
remote: Installing tilt 1.4.1
remote: Installing rails_serve_static_assets 0.0.4
remote: Installing rails_stdout_logging 0.0.3
remote: Installing sass 3.4.10
remote: Installing tzinfo 1.2.2
remote: Installing json 1.8.2
remote: Installing mail 2.6.3
remote: Installing rack-test 0.6.3
remote: Installing coffee-script 2.3.0
remote: Installing sprockets 2.12.3
remote: Installing rails_12factor 0.0.3
remote: Installing activesupport 4.2.0.rc3
remote: Installing rdoc 4.2.0
remote: Installing uglifier 2.7.0
remote: Installing rails-deprecated_sanitizer 1.0.3
remote: Installing globalid 0.3.0
remote: Installing activemodel 4.2.0.rc3
remote: Installing jbuilder 2.2.6
remote: Installing sdoc 0.4.1
remote: Installing activejob 4.2.0.rc3
remote: Installing activerecord 4.2.0.rc3
remote: Installing nokogiri 1.6.6.2
remote: Installing pg 0.18.1
remote: Installing loofah 2.0.1
remote: Installing rails-dom-testing 1.0.5
remote: Installing rails-html-sanitizer 1.0.1
remote: Installing actionview 4.2.0.rc3
remote: Installing actionpack 4.2.0.rc3
remote: Installing actionmailer 4.2.0.rc3
remote: Installing sprockets-rails 2.2.4
remote: Installing railties 4.2.0.rc3
remote: Installing coffee-rails 4.1.0
remote: Installing jquery-rails 4.0.1
remote: Installing rails 4.2.0.rc3
remote: Installing sass-rails 5.0.1
remote: Installing turbolinks 2.5.3
remote: Your bundle is complete!
remote: Gems in the groups development and test were not installed.
remote: It was installed into ./vendor/bundle
remote: Post-install message from rdoc:
remote: Depending on your version of ruby, you may need to install ruby rdoc/ri data:
remote: <= 1.8.6 : unsupported
remote: = 1.8.7 : gem install rdoc-data; rdoc-data --install
remote: = 1.9.1 : gem install rdoc-data; rdoc-data --install
remote: >= 1.9.2 : nothing to do! Yay!
remote: Bundle completed (35.01s)
remote: Cleaning up the bundler cache.
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: rake aborted!
remote: NameError: uninitialized constant Devise
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/config/initializers/devise.rb:3:in '<top (required)>'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/engine.rb:652:in 'block in load_config_initializer'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0.rc3/lib/active_support/notifications.rb:166:in 'instrument'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/engine.rb:651:in 'load_config_initializer'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/engine.rb:616:in 'block (2 levels) in <class:Engine>'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/engine.rb:615:in 'each'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/engine.rb:615:in 'block in <class:Engine>'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/initializable.rb:30:in 'instance_exec'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/initializable.rb:30:in 'run'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/initializable.rb:55:in 'block in run_initializers'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/initializable.rb:44:in 'each'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/initializable.rb:44:in 'tsort_each_child'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/initializable.rb:54:in 'run_initializers'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/application.rb:352:in 'initialize!'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/config/environment.rb:5:in '<top (required)>'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/application.rb:328:in 'require'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/application.rb:328:in 'require_environment!'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/application.rb:443:in 'block in run_tasks_blocks'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.2.4/lib/sprockets/rails/task.rb:64:in 'block (2 levels) in define'
remote: Tasks: TOP => environment
remote: (See full trace by running task with --trace)
remote: !
remote: ! Precompiling assets failed.
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to powerful-taiga-2060.
remote:
To https://git.heroku.com/powerful-taiga-2060.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/powerful-taiga-2060.git`
这是我的 Gemfile:
source 'https://rubygems.org'
gem 'rails', '4.2.0.rc3'
group :development do
gem 'sqlite3'
end
group :production do
gem 'pg'
gem 'rails_12factor'
end
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
group :development, :production, :test do
gem 'byebug'
gem 'web-console', '~> 2.0'
gem 'spring'
gem 'bootstrap-generators', '~> 3.3.1'
gem 'simple_form', :git => 'git://github.com/plataformatec/simple_form.git'
gem 'rails_admin'
gem 'mocha'
gem 'nifty-generators'
gem 'jquery-turbolinks'
gem 'devise'
end
问题一定出在 rake assets:precompile
上。谁能帮帮我?这个问题确实拖慢了我的 Rails Adventure。
最佳答案
你的 gem 都没有
group :development, :production, :test do
是根据 Heroku 日志安装的。尝试将它们放在组之外。
关于ruby-on-rails - 将应用程序部署到 Heroku : 'NameError: uninitialized constant Devise' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28508575/
我想问一个让我困惑的问题。我正在尝试扫描字符串并将其转换为实数。使用该数字来计算值(value)。这是我的代码: string input_file_name1 = "shen_test_38_30_
我正在为我的 C 类入门编写一个程序,当我尝试使用 gcc 进行编译时,我不断收到一些警告。 这是我的代码: char **outList; *outList = strdup(cloudDevice
我正在使用 Chromium 嵌入式框架。我将以下内容放在主函数中。 CefRefPtr cef; CefRequest::ReferrerPolicy origin = origin; cef->S
我是C++的新手,正在测试while循环以及C++的绝对速度及其对我的CPU的影响,但出现以下错误: Severity Code Description Project File Line Suppr
string foo; try { foo = "test"; // yeah, i know ... } catch // yeah, i know this one too :) {
当尝试在 Mac OS X 10.6 上使用 FFMPEG gem 时,ruby 会抛出一个 NameError 异常,如下所示: NameError: uninitialized constant
我做了一个程序来计算 View 的总宽度/高度(有时我想要总宽度,有时我想要总高度)。唯一的问题是:如果我正在计算宽度,我想添加一个额外的 10到总数。这是我当前的代码: func calculate
所以我只想从常规地址(字符串)中提取经度/纬度坐标。我查阅了 geokit gem 文档并按照记录的内容进行了操作,但我不断收到此错误:“NameError:未初始化的常量 Geokit::Geoco
为什么 perl -we '$c = $c+3' 上升 Use of uninitialized value $c in addition (+) at -e line 1. perl -we '$c
我有以下代码: class circularList { public: circularList() : data(0), next(this) {} public: int dat
我的情况 我正在 ASP.NET MVC4 应用程序中进行测试。我正在开发的应用程序部分将现代 WebSecurity/SimpleMembershipProvider 与正在逐步淘汰的遗留身份验证系
我是 Ruby on Rails 的新手,我想使用迁移生成 mysql 数据库。 我尝试过这个命令 ruby bin/rake db:drop db:create db:migrate --trace
我需要一些调试帮助,因为我遇到的错误真的很难。 这是一款具有复杂动画的游戏。然而,问题不在于 SpriteKit .我希望动画按照严格的顺序彼此跟随,所以我实现了 Operation 的子类: cla
这是一个示例代码: #include int main() { int n = 5; float v[n]; float sum; int i; for(i
我正在使用 SQL Server 2012 并尝试实现事务复制。我正在使用系统存储过程来创建发布和订阅。我成功地创建了这些东西,但是当我检查复制监视器时,它显示“未初始化的订阅”。 当我检查订阅的同步
我有以下脚本: use 5.12.4; use strict; use warnings; say "Enter a functionality:"; while (<>) { if (/ad
我已经阅读了有关 has_many 的文档和大量教程:通过 Rails 中的关系,但我终生无法掌握它的窍门。 我正在尝试向我的 current_user(devise) 添加一个组,并且我在 Grou
我正在尝试为移动 API 设置路由,它应该有一个版本化的 api-path。我已经可以让移动 Auth 工作了,这是在位于 的单独 Controller AuthController 中实现的。/co
我正在使用 luacheck(在 Atom 编辑器中),但对其他静态分析工具开放。 有没有办法检查我是否使用了未初始化的表字段?我阅读了文档( http://luacheck.readthedocs.
我有一家工厂,例如: FactoryGirl.define do factory :page do title 'Fake Title For Page' end end 并进行测试:
我是一名优秀的程序员,十分优秀!